[R] How to get all the data in a specific column from a dataframe?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri Feb 3 17:13:24 CET 2006


Chuck Cleland <ccleland at optonline.net> writes:

> test_frame[,"col3"]
> 
> or
> 
> subset(test_frame, select = col3)

or 

test_frame$col3

-- 
   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