Skip to content

read.table

4 messages · Georg Ehret, Ben Bolker, John Kane +1 more

#
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?

Thanks and wishing you a great remainder of the day,
Georg.
**************************
Georg Ehret
JHU
Baltimore - US
#
Georg Ehret <georgehret <at> gmail.com> writes:
[snip]

  The attachment didn't get through to the list.  Simplest thing
to do (if you can) is to post it somewhere and give us the URL.

  Ben Bolker
#
--- Ben Bolker <bolker at ufl.edu> wrote:

            
Handy places to post a file:
[b]media fire[/b] http://www.mediafire.com/
or
[b]mytempdir.com[/b] http://www.mytempdir.com



      Looking for the perfect gift? Give the gift of Flickr!
#
Georg Ehret wrote:
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