Re-read the colClasses section of ?read.table. Use "NULL", not NULL.
On Tue, May 4, 2010 at 12:11 PM, Marshall Feldman <ma...@uri.edu> wrote: > Hi, > > I am trying to read a tab-delimited file that has trailing tab delimiters. > It's a simple file with two legitimate fields. I'm using the first as > row.names, and the second should be the only column in the resulting data > frame. > > Initially, R was filling the last column with NA's, but I was able to stop > that by setting colClasses=c("character","character",NULL). Still, the data > frame is coming in with an extra column, only now its values are set to "". > > Is there any way to skip the trailing delimited field entirely? I've > searched for an answer without luck. > > Thanks. > Marsh Feldman > > ______________________________________________ > 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. > ______________________________________________ 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.