I am wanting to change arguments to a function dynamically. For example, in making a call to qplot, I want to dynamically define all of the arguments so that I can create the plot dependent on user input. I have played with eval() a bit, but have had no success. Mark Sharp
On 01.01.2011 18:56, Mark Sharp wrote:> I am wanting to change arguments to a function dynamically. For example, in making a call to qplot, I want to dynamically define all of the arguments so that I can create the plot dependent on user input. I have played with eval() a bit, but have had no success.If passing the arguments is not sufficient, then you may want to take a look at ?do.call Uwe Ligges> > Mark Sharp > ______________________________________________ > R-help at 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.
See aes_string(), perhaps. baptiste On 1 January 2011 18:56, Mark Sharp <msharp at sfbr.org> wrote:> I am wanting to change arguments to a function dynamically. For example, in making a call to qplot, I want to dynamically define all of the arguments so that I can create the plot dependent on user input. I have played with eval() a bit, but have had no success. > > Mark Sharp > ______________________________________________ > R-help at 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. >