[Rd] Bug in new behaviour for all.equal and environments?

Rui Barradas ruipbarradas at sapo.pt
Sun Sep 21 19:38:50 CEST 2014


Hello,

In R 3.1.1 on Windows 7 it's ok.

 > all.equal(baseenv(), baseenv())
[1] TRUE
 > sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Portuguese_Portugal.1252 
LC_CTYPE=Portuguese_Portugal.1252
[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C 

[5] LC_TIME=Portuguese_Portugal.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

Rui Barradas

Em 21-09-2014 18:06, Kevin Ushey escreveu:
> Hi R-devel,
>
> The following code:
>
>      all.equal(baseenv(), baseenv())
>
> gives the error when run in a clean R session with latest R-devel (r66650):
>
>      kevin:~$ R --vanilla --slave -e "all.equal(baseenv(), baseenv())"
>      Error in all.equal.envRefClass(target[[i]], current[[i]],
> check.attributes = check.attributes,  :
>        attempt to apply non-function
>      Calls: all.equal ... all.equal.list -> all.equal -> all.equal.envRefClass
>      Execution halted
>
> Although I don't know if it's helpful -- it appears that packages that
> include some S4 machinery will effect the outcome of this error, e.g.
> if we load 'Biobase' first:
>
>      kevin:~$ R --vanilla --slave -e
> "suppressPackageStartupMessages(library(Biobase));
> all.equal(baseenv(), baseenv())"
>      Error in target$getClass() : object '.refClassDef' not found
>      Calls: all.equal ... all.equal.list -> all.equal ->
> all.equal.envRefClass -> <Anonymous>
>      Execution halted
>
> We were bumping into an error with this in Rcpp -- we used all.equal
> (through RUnit) to confirm that baseenv(), and a function returning
> the base environment, would return TRUE.
>
> For completeness:
>
>      kevin:~$ R --vanilla --slave -e "sessionInfo()"
>      R Under development (unstable) (2014-09-20 r66650)
>      Platform: x86_64-apple-darwin13.3.0 (64-bit)
>
>      locale:
>      [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>
>      attached base packages:
>      [1] stats     graphics  grDevices utils     datasets  methods   base
>
> Thanks,
> Kevin
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list