[R] Accessing a field in a data fram

R_Learner sschiang8 at gmail.com
Wed Jul 2 21:10:37 CEST 2008

raw <- read.csv(file=filename, head=TRUE,sep=",") 

I've read in a csv file, and I'm looking to access a column whose name is
held in a string.

For example, I want to access raw$one or raw$two, but this will depending on
the string. Let's say that the string is decision<-"one". How would I access

The following doesn't work:

Please help me!
View this message in context: http://www.nabble.com/Accessing-a-field-in-a-data-fram-tp18244661p18244661.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list