Hi there, I'm working on a for loop to perform some simple calculations on data. However, I'm having trouble extracting components from my data frame using names pulled off a list to reference headers. I'm relatively new to R, but I've done some programming in various other languages, and have done this kind of thing before. How is this done in R?
Example code, to demonstrate what I'm attempting to do: > work_data$i.15.0 [1] 0.03 0.03 0.03 0.02 0.02 0.03 0.02 0.02 > currentFA [1] "i.15.0" > work_data$currentFA *this is what I want to do, access my data frame by calling with header name pulled from elsewhere. NULL > curFA <- noquote(currentFA) *tried stripping quotes, still doesn't work > curFA [1] i.15.0 > work_data$curFA NULL Thanks! Chris [[alternative HTML version deleted]] ______________________________________________ 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.