[R] read.table: skipping trailing delimiters
ggrothendieck at gmail.com
Tue May 4 18:34:15 CEST 2010
Re-read the colClasses section of ?read.table. Use "NULL", not NULL.
On Tue, May 4, 2010 at 12:11 PM, Marshall Feldman <marsh at uri.edu> wrote:
> 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
> 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.
> Marsh Feldman
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help