In: Statistics and Probability
Why do I keep getting the error "More columns than column names" when trying to import the following data into R Studio?:
PRICE YEARSOLD MILES
COLOR TITLESTATUS
TRANSMISSION
4500 11 170000
SILVER CLEAN MANUAL
34590 1 2000 SILVER
CLEAN AUTOMATIC
4500 14 203000
SILVER CLEAN AUTOMATIC
11990 6 53337 GRAY
CLEAN AUTOMATIC
10490 8 36543 RED
CLEAN AUTOMATIC
2800 19 208000
SILVER CLEAN MANUAL
1200 19 244000
SILVER CLEAN AUTOMATIC
2500 19 208000
BROWN CLEAN AUTOMATIC
2000 15 190000
GREEN CLEAN AUTOMATIC
39990 3 31252 RED
CLEAN AUTOMATIC
16590 3 31644 BLUE
CLEAN AUTOMATIC
9300 2 65000 WHITE
SALVAGE AUTOMATIC
1800 17 190000
BLACK CLEAN AUTOMATIC
16900 49 27000
GREEN CLEAN MANUAL
14900 62 1000 GREEN
CLEAN MANUAL
16900 38 91000
BROWN CLEAN MANUAL
15900 40 106229
SILVER CLEAN AUTOMATIC
15900 46 20000 GRAY
CLEAN MANUAL
29900 19 47000
WHITE CLEAN MANUAL
9900 59 4200 GREEN
CLEAN MANUAL
14900 13 98843
BLACK CLEAN AUTOMATIC
13900 44 82000
GREEN CLEAN MANUAL
32900 29 134800
WHITE CLEAN MANUAL
21721 7 100071
BLACK CLEAN AUTOMATIC
19900 54 5000 BLUE
CLEAN AUTOMATIC
18900 44 78149
BROWN CLEAN MANUAL
35900 26 105000
GRAY CLEAN MANUAL
34162 2 26649
SILVER CLEAN AUTOMATIC
12967 3 20083 WHITE
CLEAN AUTOMATIC
29900 26 134000
WHITE CLEAN MANUAL
11900 68 33000
GREEN CLEAN MANUAL
19174 2 21780
SILVER CLEAN AUTOMATIC
16429 3 25690 BLACK
CLEAN AUTOMATIC
53095 2 25320 WHITE
CLEAN AUTOMATIC
27900 33 67000 BLUE
CLEAN MANUAL
16401 1 32756 BLACK
CLEAN AUTOMATIC
16900 40 30000
SILVER CLEAN MANUAL
10179 5 56000
ORANGE CLEAN AUTOMATIC
34900 42 5000 BLUE
CLEAN MANUAL
51900 57 100
BURGUNDY CLEAN MANUAL
We are getting this error because there is blank space after last column.
We can rectify this by using this Code