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 raw$one? The following doesn't work: numbers<-raw$decision Please help me! Thanks! -- 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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.