Re: [R] read tab delimited file from a certain line

2013-01-20 Thread Christof Kluß
Hi Henrik, that's perfect, thanks! Greetings Christof Am 18-01-2013 19:26, schrieb Henrik Bengtsson: Christof, I've added support for this to the R.filesets package. In your case, then all you need to do is: library(R.filesets) dlf - readDataFrame(filename, skip=^year) No need to specify

Re: [R] read tab delimited file from a certain line

2013-01-18 Thread Henrik Bengtsson
Christof, I've added support for this to the R.filesets package. In your case, then all you need to do is: library(R.filesets) dlf - readDataFrame(filename, skip=^year) No need to specify any other arguments - they're all automagically inferred - and the default is stringsAsFactors=FALSE.

Re: [R] read tab delimited file from a certain line

2013-01-18 Thread David Winsemius
On Jan 18, 2013, at 10:26 AM, Henrik Bengtsson wrote: Christof, I've added support for this to the R.filesets package. In your case, then all you need to do is: library(R.filesets) dlf - readDataFrame(filename, skip=^year) No need to specify any other arguments - they're all

Re: [R] read tab delimited file from a certain line

2013-01-17 Thread Christof Kluß
Hello thank you for the fast and helpful answer! Now the following works fine for me x - readLines(filename) i - grep(^year, x) dlf - read.table(textConnection(x[i:length(x)]), header = T, stringsAsFactors=F,sep=\t) Greetings Christof Am 16-01-2013 16:55, schrieb Rui Barradas:

[R] read tab delimited file from a certain line

2013-01-16 Thread Christof Kluß
Hi I would like to read table data from a text-files with extra informations in the header (of unknown line count). Example: informations (unknown count of lines) ... and at some point the table -- year month mday value 2013 1 16 0 ... If it was an excel

Re: [R] read tab delimited file from a certain line

2013-01-16 Thread Rui Barradas
Hello, Read the file using readLines, then grep ^year. You can then use a textConnection to read.table: x - readLines(con = textConnection( informations (unknown count of lines) ... and at some point the table -- year month mday value 2013 1 16 0 )) # This is it i - grep(^year, x)

Re: [R] read tab delimited file from a certain line

2013-01-16 Thread arun
month mday value #1 2013 1   16 0 A.K. - Original Message - From: Christof Kluß ckl...@email.uni-kiel.de To: r-h...@stat.math.ethz.ch Cc: Sent: Wednesday, January 16, 2013 9:17 AM Subject: [R] read tab delimited file from a certain line Hi I would like to read table data from