[R] Setting the Number of Columns

Matt Borkowski commnthght at hotmail.com
Wed May 29 17:19:08 CEST 2002


I am trying to read in a data set with 17 columns into a data frame.  The 
problem is, there are some lines in the data that occasionally pop up with 
less than 17 numbers in a row.  I was trying to use the command

data <- read.table("dataset.dat", fill=TRUE, quote = "")

There was no problem running this with an older version of R and the data 
was forced into a data frame with 17 columns with the missing data filled in 
as NA.  But after updating to the newest version something changed and now 
the data is being forced into a data frame with only 14 columns.

With the newest version of R is it possible to force the data into a data 
frame with user specified dimensions and fill in any missing data in a row 
with NA?

_________________________________________________________________


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list