[R] change in behavior of c.trellis

Duncan Murdoch murdoch.duncan at gmail.com
Thu Dec 14 10:54:10 CET 2017


This looks like a bug in latticeExtra:  in the c.trellis function there 
are these lines:

     ## some prepanel functions require a 'subscripts' argument in each 
'panel.args'
     if ("subscripts" %in% c(names(formals(obj1$prepanel.default)),
                             names(formals(obj1$prepanel)))) {

But obj1$prepanel is NULL in your test case.  NULL is not a legal 
argument to formals(), and it now warns about it.

Duncan Murdoch

On 14/12/2017 1:12 AM, Richard M. Heiberger wrote:
>> library(latticeExtra)
> Loading required package: lattice
> Loading required package: RColorBrewer
>> t11 <- xyplot(1 ~ 1)
>> t11
>> c(t11, t11)
> Warning message:
> In formals(fun) : argument is not a function
>> version
>                 _
> platform       x86_64-w64-mingw32
> arch           x86_64
> os             mingw32
> system         x86_64, mingw32
> status         Patched
> major          3
> minor          4.3
> year           2017
> month          12
> day            12
> svn rev        73903
> language       R
> version.string R version 3.4.3 Patched (2017-12-12 r73903)
> nickname       Kite-Eating Tree
>>
> 
> 
> the c.trellis seems to work correctly except for the new warning.
> 
> There was no warning in 3.3.3.
> I first noticed it in 3.4.1
> 
> the c.trellis function itself is not changed between 3.3.3 and 3.4.3 Patched.
> 
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list