Hello Everyone,
May be a silly question.
How to pass programmatically variables which are not known in advance and
are quoted? Variables are quoted implicitly in functions like "subset"
and "transform" and explicitly in ggplot and plyr.
For instance I would like to have something like this:
myfunc<-functon(mydata,X) subset(mydata,X>4)
myfunc<-function(mydata,X,Y) {ggplot(mydata,aes(x=X,y=Y))+geom_points()}
this does not work since X and Y are not in mydata.
Many, many thanks,
Vitalie.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.