[R] read.table
Jim Lemon
jim at bitwrit.com.au
Thu Mar 6 11:23:36 CET 2008
Georg Ehret wrote:
> Dear R community, I encounter a problem reading data into a dataframe. See
> attachment for the input. I use:
> data<-read.table("test",fill=T,row.names=1)
>
> When you look at "data" you can see that some lines of my input were
> broken... I can avoid this problem by sorting the lines by length... Do I
> have it wrong or is there a bug?
>
Hi George,
I'm making a total guess here, but you may be trying to read a data file
in which the lines have been "wrapped" by an editor or other program.
Pretty much all of the data reading functions read line by line, and if
lines are broken, especially unevenly, at best you get scrambled data in
your target data object.
Jim
More information about the R-help
mailing list