Re: [R] select columns from dataframe

2010-07-09 Thread Erik Iverson
Jonathan Flowers wrote: Hi, I would like to extract columns from a dataframe using a vector of desired column names. The following working example uses the select argument in the subset function to accomplish what I am trying to do. Is there a better solution? This is very much "Introducti

[R] select columns from dataframe

2010-07-09 Thread Jonathan Flowers
Hi, I would like to extract columns from a dataframe using a vector of desired column names. The following working example uses the select argument in the subset function to accomplish what I am trying to do. Is there a better solution? Thanks. #my data data <- data.frame("col1"=c(1,2,3),"col2