Suppose I have several dataframes: g1, g2, g3....
Each as the same variable names: X, Y....
I want to write a function that can deal with variables across the
dataframes. The easiest way that I can think of to do it would be to
write a function that could walk through each dataframe and do stuff
to the variables, something like:
mush.data <- function(varname, numgroups) {
for(i in 1:numgroups) {
SomeFunction(paste("g", i, "$",varname)
}
BUT - paste just gives me a string. How do I get R to realize that
it's actually pointing to a vector? I feel that R should let me do
this, right?
Any help would be greatly appreciated.
/\llan