[R] reading in only one column from text file

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Mar 7 23:01:33 CET 2006


"mark salsburg" <mark.salsburg at gmail.com> writes:

> How do I manipulate the read.table function to read in only the 2nd
> column???

Something along the lines of

cc <- rep("NULL", ncols)
cc[2] <- NA # use type.convert
read.table(.... colClasses=cc ....)


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list