Gabor Grothendieck ggrothendieck at myway.com writes:
:
: F Duan f.duan at yale.edu writes:
:
: I have a very big tab-delim txt file with header and I only want to import
: several columns into R. I checked the options for read.table and only
:
: Try using scan with the what=list(...) and
Thanks a lot.
Your way works perfect. And one more tiny question related to your codes:
My data file has many columns to be omitted (suppose the first 20 ones), but I
found scan(myfile, what=list(rep(NULL, 20), rep(0, 5)) doesn't work. I had to
to type NULL 20 times and 0 five times in the
Use as.list.
Andy
From: F Duan
Thanks a lot.
Your way works perfect. And one more tiny question related to
your codes:
My data file has many columns to be omitted (suppose the
first 20 ones), but I
found scan(myfile, what=list(rep(NULL, 20), rep(0, 5))
doesn't work. I had to
At Tuesday 01:55 PM 8/10/2004, F Duan wrote:
Thanks a lot.
Your way works perfect. And one more tiny question related to your codes:
My data file has many columns to be omitted (suppose the first 20 ones),
but I
found scan(myfile, what=list(rep(NULL, 20), rep(0, 5)) doesn't work. I
had to
to
Dear R people,
I have a very big tab-delim txt file with header and I only want to import
several columns into R. I checked the options for read.table and only
found nrows which lets you specify the maximum number of rows to read in.
Although I can use some text editors (e.g., wordpad) to
On Mon, 9 Aug 2004, F Duan wrote:
Dear R people,
I have a very big tab-delim txt file with header and I only want to import
several columns into R. I checked the options for read.table and only
found nrows which lets you specify the maximum number of rows to read in.
Although I can use
If you've got access to unix tools (i.e. linux or cygwin), consider
the cut command. Great for column selection.
Thomas Lumley [EMAIL PROTECTED] writes:
On Mon, 9 Aug 2004, F Duan wrote:
Dear R people,
I have a very big tab-delim txt file with header and I only want to import
several
There is no way for read.table to skip columns. It is however very easy
to do this with a preprocessing of the table: cut, awk and perl all come
to mind, and you could do it in R too, reading a block of rows at a time
and writing them back out.
scan() can skip columns, but I would still use