I am trying to read data from the PISA 2012 study (http://pisa2012.acer.edu.au/downloads.php) into R using the read.table function. This is the code I tried:
pisa <- read.table("pisa2012.txt", sep = "")
unfortunately I keep getting the following error message:
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
: line 2 did not have 184 elements
I have tried to set
header = T
but then get the following error message
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
:line 1 did not have 184 elements
Lastly, this is what the .txt file looks like ...
http://postimg.org/image/4u9lqtxqd/
Thanks for your help!
sepvalue here describes no separation. Is there a regular separating value? Appears as though it could be tabs, denoted by "\t" in theseparguement. - BadgerreadLinesto read each line of the data into R to check what the first line actually is (opening large text file in text editor can be misleading with so many line wraps and blank space). Also, if you could post the first few lines of data, people would have more to help you with. - Heisenberg