search for: v1_2

Displaying 1 result from an estimated 1 matches for "v1_2".

Did you mean: v1.2
2010 May 17
2
Dynamically build variable names
I'm trying to dynamically build variable names to use on a list. Let's say I have a list like this one: l <- list(V1_1=c(1,2,3), V1_2=c('One','Two','Three')) And I succesfully build my variable name like this: paste('l$', 'V1_1', sep='') Why can't I just run a mean call with the pasted variable name? mean(paste('l$', 'V1_1', sep='')) So, my question...