Skip to content

help with formula and data= argument

3 messages · Derek Ogle, Baptiste Auguie, Gabor Grothendieck

#
Hi,


It seems to me that you could write a generic function myplot() and  
have different methods for each class of object (like plot does).  
Either S3 or S4 classes would do I think. Then it is only a matter of  
making each method work separately. In particular, the method for a  
formula could contain the with(data, ) construct to make all the  
variables accessible to the text() function.

HTH,

baptiste
On 4 Apr 2009, at 23:27, Derek Ogle wrote:

            
_____________________________

Baptiste Augui?

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag
#
Try adding this line:

 label <- eval(substitute(label), df, environment(formula))
On Sat, Apr 4, 2009 at 6:27 PM, Derek Ogle <DOgle at northland.edu> wrote: