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

From: Vincent Deng <bioflash_at_gmail.com>
Date: Sat 04 Feb 2006 - 02:29:16 EST


Dear R-helpers:

Suppose I have a datafram called "test_frame" like this

     col1   col2  col3  col4
r1   x        x        x     x
r2   x        x        x     x
r3   x        x        x     x
..    x        x        x     x
rn   x        x        x     x

I know I can get data of col3 by using test_frame[,3].

My question is, if I want to do this by specifying "col3" rather than 3, what should I do?

Many thanks....

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Feb 04 02:53:37 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:21 EST