Re: [R] How to read only specified columns from a data file

2011-03-16 Thread Luis Ridao
9. log_fy_coff -0.527060 0.089949 0.6003 0.6347 0.6667 0.7060 >>>>> 0.7367 >>>>> >>>>> as you see there are only 9 columns in inp and the rest is read in in >>>>> the following row(see row 7) >>>>> I just don't understand why

Re: [R] How to read only specified columns from a data file

2011-03-16 Thread Sarah Goslee
are only 9 columns in inp and the rest is read in in >>>> the following row(see row 7) >>>> I just don't understand why this is happening (using fill=T does not >>>> help either) >>>> >>>> Best, >>>> Luis >>>>

Re: [R] How to read only specified columns from a data file

2011-03-16 Thread David Winsemius
and select columns you need, e.g.: tab <- read.table(myfile, skip=2)[,1:5] -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org ] On Behalf Of Luis Ridao Sent: Tuesday, March 15, 2011 11:53 AM To: r-help@r-project.org Subject: [R] How to read onl

Re: [R] How to read only specified columns from a data file

2011-03-16 Thread Luis Ridao
Best, >>> Luis >>> >>> On Tue, Mar 15, 2011 at 5:15 PM, David Winsemius >>> wrote: >>>> >>>> On Mar 15, 2011, at 1:11 PM, wrote: >>>> >>>>> I think you need to read an introduction to R. >>>>> For start

Re: [R] How to read only specified columns from a data file

2011-03-16 Thread Sarah Goslee
ge----- >>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >>> On Behalf Of Luis Ridao >>> Sent: Tuesday, March 15, 2011 11:53 AM >>> To: r-help@r-project.org >>> Subject: [R] How to read only specified columns from a data fil

Re: [R] How to read only specified columns from a data file

2011-03-16 Thread Luis Ridao
read.table(myfile, skip=2)[,1:5] >> >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >> On Behalf Of Luis Ridao >> Sent: Tuesday, March 15, 2011 11:53 AM >> To: r-help@r-project.org >> Subject: [R] How to read

Re: [R] How to read only specified columns from a data file

2011-03-15 Thread David Winsemius
<- read.table(myfile, skip=2)[,1:5] -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org ] On Behalf Of Luis Ridao Sent: Tuesday, March 15, 2011 11:53 AM To: r-help@r-project.org Subject: [R] How to read only specified columns from a data file R-help,

Re: [R] How to read only specified columns from a data file

2011-03-15 Thread rex.dwyer
nal Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Luis Ridao Sent: Tuesday, March 15, 2011 11:53 AM To: r-help@r-project.org Subject: [R] How to read only specified columns from a data file R-help, I'm trying to read a data file with p

[R] How to read only specified columns from a data file

2011-03-15 Thread Luis Ridao
R-help, I'm trying to read a data file with plenty of columns. I just need the first 5 but it doe not work by doing something like: > mycols <- rep(NULL, 430) ; mycols[c(1:4)] <- NA > read.table(myfile, skip=2, colClasses=mycols) Any suggestions? Thanks in advance _