Vote count:
0
here is the code I used:
d = read.table("Movies.txt",
sep="\t",
col.names=c( "id", "name", "date", "link", "c1", "c2", "c3","c4", "c5", "c6","c7", "c8", "c9","c10", "c11", "c12","c13", "c14", "c15","c16", "c17", "c18", "c19"),
fill=FALSE,
strip.white=TRUE)
and here is the text file:
1 Toy Story (1995) 01-Jan-95 http://ift.tt/1zvjzAr 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
2 GoldenEye (1995) 01-Jan-95 http://ift.tt/1Blhuev 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
3 Four Rooms (1995) 01-Jan-95 http://ift.tt/1zvjwEQ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
4 Get Shorty (1995) 01-Jan-95 http://ift.tt/1BlhuuN 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0
5 Copycat (1995) 01-Jan-95 http://ift.tt/1zvjzAy 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0
6 Shanghai Triad (Yao a yao yao dao waipo qiao) (1995) 01-Jan-95 http://ift.tt/1BlhuuP 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
7 Twelve Monkeys (1995) 01-Jan-95 http://ift.tt/1zvjwVi 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0
8 Babe (1995) 01-Jan-95 http://ift.tt/1BlhvyU 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0
9 Dead Man Walking (1995) 01-Jan-95 http://ift.tt/1zvjA7i 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
10 Richard III (1995) 22-Jan-96 http://ift.tt/1BlhvyY 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0
11 Seven (Se7en) (1995) 01-Jan-95 http://ift.tt/1zvjxbI 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0
12 "Usual Suspects, The (1995)" 14-Aug-95 "http://ift.tt/1Blhvz4" 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0
13 Mighty Aphrodite (1995) 30-Oct-95 http://ift.tt/1zvjxbN 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
14 "Postino, Il (1994)" 01-Jan-94 "http://ift.tt/1zvjA7n" 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
15 Mr. Holland's Opus (1995) 29-Jan-96 http://ift.tt/1BlhuLk's%20Opus%20(1995) 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
16 French Twist (Gazon maudit) (1995) 01-Jan-95 http://ift.tt/1zvjxbS 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0
17 From Dusk Till Dawn (1996) 05-Feb-96 http://ift.tt/1BlhvPu 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0
18 "White Balloon, The (1995)" 01-Jan-95 http://ift.tt/1zvjA7p 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
19 Antonia's Line (1995) 01-Jan-95 http://ift.tt/1BlhvPw 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
20 Angels and Insects (1995) 01-Jan-95 http://ift.tt/1zvjxbU 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
It is clear that Line 15 had 23 elements. It is even clearer when in the text editor that there are tabs where they should be. Why would I be getting this error message ?
asked 41 secs ago
read.table line 15 does not contain 23 elements - R
Aucun commentaire:
Enregistrer un commentaire