Hello, I'm trying to access an object, given only its name as a symbol. I cannot figure out how to proceed. Suppose I call substitute( ) on the expression 'x + 2':
> parse.tree <- substitute(x + 2); The constituents of parse.tree are of type symbol and numeric: > str(parse.tree[[1]]) symbol + > str(parse.tree[[2]]) symbol x > str(parse.tree[[3]]) num 2 Suppose that x is S4 object, and that I need to access a slot of that object. How can I do so, using only 'parse.tree' (or parse.tree coerced into a list)? Thanks, Patrick [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel