Re: [R] Importing data from text file with mixed format

2009-10-26 Thread delnatan
p-boun...@r-project.org >> [mailto:r-help-boun...@r-project.org] On Behalf Of delnatan >> Sent: Saturday, October 24, 2009 8:32 PM >> To: r-help@r-project.org >> Subject: [R] Importing data from text file with mixed format >> >> >> Hi, >> I'

Re: [R] Importing data from text file with mixed format

2009-10-25 Thread Gabor Grothendieck
This solution uses strapply in gsubfn. It assumes the timepoints are 1, 2, 3, ... (although later we remove this restriction just in case). The first line reads in myfile. The second line reads the numeric rows into matrix s. The third line reads in the column names. The fourth line converts to

Re: [R] Importing data from text file with mixed format

2009-10-25 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of delnatan > Sent: Saturday, October 24, 2009 8:32 PM > To: r-help@r-project.org > Subject: [R] Importing data from text file with mixed format > > >

Re: [R] Importing data from text file with mixed format

2009-10-25 Thread jim holtman
try this: > # read in the file > x <- readLines(textConnection("#begin text file + Timepoint 1 + ObjectNumber Volume SurfaceArea + 1 5.3 9.7 + 2 4.9 8.3 + 3 5.0 9.1 + 4 3.5

[R] Importing data from text file with mixed format

2009-10-25 Thread delnatan
Hi, I'm having difficulty importing my textfile that looks something like this: #begin text file Timepoint 1 ObjectNumber Volume SurfaceArea 1 5.3 9.7 2 4.9 8.3 3 5.0 9.1 4 3.5