read.table
On Sun, 17 Jun 2001, [iso-8859-1] Ricardo Gonçalves wrote:
Dear All,
A beginner again:
I am using the command: x<-read.table("a:\xx.dat", headre=TRUE)
and I receive the error message:
Error in read.table("a:xx.dat", header = TRUE) :
all rows must have the same length.
My data matriz includes 62 variables by 131 countries.
There are some problem in this parameters?
The answer is the same: do read the R Data Import/Export Manual.
But immediately:
You need a:/xx.dat or a:\\xx.dat (do read the FAQs)
Which version of R is this? The latest released version, 1.3.0,
given you a meesage about what the row numbers were before that message,
and you should heed (and quote) all the messages you get.
You probably need to set a separator, e.g. sep="\t".
I hope your 62 variables are all on one line, as read.table cannot
read multi-line records, as the help page clearly states.
file: the name of the file which the data are to be read from. Each
row of the table appears as one line of the file. If it does
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._