[R] subset columns from list with variable substitution

jween jween at rockwoodclinic.com
Fri May 25 21:32:17 CEST 2012


Thanks Don

but 

table[,list1]

did not work either:

Error in `[.data.frame`(table, , list1) : undefined columns selected.

I'm guessing my list (list1) is not structured right? Displaying it has no
commas, so the whole list may be taken as a single variable rather than a
sequence of variables? I've tried various ways of reformatting (c(),
as.list(), etc), but no go.

also

"i in namelist" does not work while
"i %in% namelist" does. I don't really reference "i" in any function, only
using it in the conditional. 


Any other suggestions?

Thanks

Jon

--
View this message in context: http://r.789695.n4.nabble.com/subset-columns-from-list-with-variable-substitution-tp4631374p4631394.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list