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:> > Dear R community, I encounter a problem reading data into a dataframe. See > attachment for the input.[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
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