[Rd] S3 best practice
Robin Hankin
r.hankin at noc.soton.ac.uk
Fri Mar 2 15:01:59 CET 2007
Hello everyone
Suppose I have an S3 class "dog" and a function plot.dog() which
looks like this:
plot.dog <- function(x,show.uncertainty, ...){
<do a simple plot>
if (show.uncertainty){
<perform complicated combinatorial stuff that takes 20 minutes
and superimpose the results on the simple plot>
}
}
I think that it would be better to somehow precalculate the
uncertainty stuff and plot it separately.
How best to do this
in the context of an S3 method for plot()?
What is Best Practice here?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
More information about the R-devel
mailing list