I have written a function that calls xyplot() from the lattice package.
In this function (which is actually a method for plot(), I assign a value
plotObj <- xyplot(fmla,groups=.......)
and then either either do print(plotObj) --- to display a plot as well
as returning plotObj, to be kept for future use/reference.
I have just noticed that if I do
p1 <- plot(X)
and
p2 <- plot(X,transform=FALSE)
where X is of course an object of the class for which my method gets
used, I get p1$call to be
xyplot(X)
and p2$call to be
xyplot(X, transform = TRUE)
That is, it gives the arguments supplied to the calling function (my
plot method) in the call component, and not the arguments to xyplot().
This seems strange to me. Should I have, uh, expected this? *Why*
should I have expected this? Can anyone explain?
I guess it's just idle curiosity; nothing really riding on it.
Thanks.
cheers,
Rolf
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.