If a text file has rows of variable lengths. How to read the file into R? I think some people may suggest using 'fill=T', however, it sort of messes the data up, for example, in the text file: a b c d 1 2 3 4 1 8 6 1 2 0 1 1 0 If I read in the file using 'read.table("data", head=T, fill=T), then the data.frame in R will be: a b c d 1 2 3 4 1 8 6 NA 1 2 0 NA 1 1 0 NA
Could anyone tell me how to handle this? Thank you very much, Karena -- View this message in context: http://r.789695.n4.nabble.com/fill-T-tp4454751p4454751.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.