Subset with selection variable from function argument. Is there another way?
Dear list, I'm making my current code more generic and would like some advise. The basic problem is subset and the name of the column to be compared for selection. What I've come up with is
data(mammals) set <- bottompremolars" subset(mammals, eval(parse(file="",text=set)) > 2)
This seems a bit odd. Is there a nicer way? /Fredrik