Re: [R] Ignore text when reading data

2009-01-28 Thread beyar
thanks to all for the solutions. Especially to Jim H for this one which worked perfectly... (i only had to change the seperater on the header to /t as there are spaces in header names) Try this: > x <- readLines(textConnection("main data file - file 1 + by mr x + etc + + + T

Re: [R] Ignore text when reading data

2009-01-28 Thread jim holtman
Try this: > x <- readLines(textConnection("main data file - file 1 + by mr x + etc + + + Timeout1 + Sec mm + 0.82495117 -0.020977303 + 1.3554688 -0.059330709 + 1.826416-0.021419302 + 2.3295898 -0.051521059 + 2.8347168 -0.020661414 + + + Timeout1 + Sec

Re: [R] Ignore text when reading data

2009-01-28 Thread Remko Duursma
Sorry, forgot this line after the textConnection bit: r <- readLines(myfile) - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Science University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of Biological Science Macqua

Re: [R] Ignore text when reading data

2009-01-28 Thread Remko Duursma
# replace this bit, replace it with your file name myfile <- textConnection( "Timeout1 Sec mm 0.82495117 -0.020977303 1.3554688 -0.059330709 1.826416-0.021419302 2.3295898 -0.051521059 2.8347168 -0.020661414 Timeout1 Sec mm 3.8679199 -0.0004396

[R] Ignore text when reading data

2009-01-28 Thread beyar
Hi, I have tab delimited text files containing numerical data, like below, but many more columns. As you can see, the first few lines are heading and file data. I need to skip these lines. 2 lines above where the numbers start is what I want to use as my header rows. I then want to ignore the