[R] Variable scope R 2.6.1
Deepayan Sarkar
deepayan.sarkar at r-project.org
Fri Jan 4 00:30:18 CET 2008
On 1/2/08, John Fox <jfox at mcmaster.ca> wrote:
> Dear Stefan,
>
> I don't think that your question was answered.
>
> If you invoke the formula method for splom(), then your function works; that
> is, you can use
>
> splom(~as.data.frame(rbind(data, outliers)), . . . .
>
> It looks to me as if this is a scoping problem produced by the way in which
> splom.data.frame() re-invokes the generic splom():
Yes, this was an unintended side-effect of the non-standard scoping
rules for the formula method. This particular problem should be fixed
by the next lattice update.
> > lattice:::splom.data.frame
> function (x, data = NULL, ...)
> {
> ccall <- match.call()
> if (!is.null(ccall$data))
> warning("explicit 'data' specification ignored")
> ccall$data <- list(x = x)
> ccall$x <- ~x
> ccall[[1]] <- quote(lattice::splom)
> eval.parent(ccall)
> }
>
> (I'm copying this response to Deepayan Sarkar, in case he wants to
> comment.)
>
>
> Finally, the warnings reflect an incorrect call to trellis.par.set(); you
> should use
>
> trellis.par.set(background=list('white'))
trellis.par.set(background=list(col = 'white'))
would be more appropriate.
-Deepayan
More information about the R-help
mailing list