[Rd] Documentation error in subsitute
Hi all, The documentation for substitute currently reads: Substitution takes place by examining each component of the parse tree as follows: If it is not a bound symbol in ‘env’, it is unchanged. If it is a promise object, i.e., a formal argument to a function or explicitly created using ‘delayedAssign()’, the expression slot of the promise replaces the symbol. If it is an ordinary variable, its value is substituted, unless ‘env’ is ‘.GlobalEnv’ in which case the symbol is left unchanged. Since the clause referring to the globalenv() is attached to the discussion of ordinary variables, I thought that it implied that delayedAssign("a", "test") substitute(a) would return "test" (but actually it returns quote(a)) I'd suggest rewording this paragraph to: Substitution takes place by examining each component of the parse tree as follows: If it is not a bound symbol in ‘env’, it is unchanged. If it is a promise object, i.e., a formal argument to a function or explicitly created using ‘delayedAssign()’, the expression slot of the promise replaces the symbol. If it is an ordinary variable, its value is substituted. There's one important exception to these rules: If 'env' is the ‘.GlobalEnv’, then no substitution occurs. Hadley -- Chief Scientist, RStudio http://had.co.nz/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R-3.0.0 reg-tests-3.R / survival
"make check" is failing on reg-test3.R with a message that survival was built with an older version of R. (On my Ubuntu 32 bit and Ubuntu 64 bit machines). Why would "make check" be looking anywhere that it would find something built with an older version of R? ~/RoboAdmin/R-3.0.0/tests$ tail reg-tests-3.Rout.fail > print(1.001, digits=16) [1] 1.001 > ## 2.4.1 gave 1.001 > ## 2.5.0 errs on the side of caution. > > > ## as.matrix.data.frame with coercion > library(survival) Error: package 'survival' was built before R 3.0.0: please re-install it Execution halted __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R-package preparation --as-cran behaving unexpectedly
Dear all, I am trying to submit an R-package to CRAN. In preparation I do run R_INSTALL_TAR=/bin/tar R CMD check --as-cran parallelize.dynamic_0.9.tar.gz and the command finishes without warnings or errors. As a final output I get NOTE: There was 1 note. See ‘.../Rpackages/parallelize.dynamic/parallelize.dynamic.Rcheck/00check.log’ for details. The file contains the standard output of the 'R CMD check ...' call precisely. If I submit this very tarball to CRAN I get rejected with warnings as reported from '--as-cran' checks there. In my case they are valid warnings about assignments in .GlobalEnv which I can certainly fix. However, my concern is about the discrepancy between the outputs of 'R CMD check --as-cran' runs locally as compared to the run on the CRAN-site. Any help is appreciated. I am running R version 2.15.2 (2012-10-26) -- "Trick or Treat" Platform: x86_64-unknown-linux-gnu (64-bit) Thanks in advance, Stefan -- http://visigen.lumc.nl/emgm http://s-boehringer.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R-package preparation --as-cran behaving unexpectedly
On 03/04/2013 7:25 AM, Stefan Boehringer wrote: Dear all, I am trying to submit an R-package to CRAN. In preparation I do run R_INSTALL_TAR=/bin/tar R CMD check --as-cran parallelize.dynamic_0.9.tar.gz and the command finishes without warnings or errors. As a final output I get NOTE: There was 1 note. See ‘.../Rpackages/parallelize.dynamic/parallelize.dynamic.Rcheck/00check.log’ for details. The file contains the standard output of the 'R CMD check ...' call precisely. If I submit this very tarball to CRAN I get rejected with warnings as reported from '--as-cran' checks there. In my case they are valid warnings about assignments in .GlobalEnv which I can certainly fix. However, my concern is about the discrepancy between the outputs of 'R CMD check --as-cran' runs locally as compared to the run on the CRAN-site. Any help is appreciated. I am running R version 2.15.2 (2012-10-26) -- "Trick or Treat" Platform: x86_64-unknown-linux-gnu (64-bit) Presumably CRAN is now running checks from 3.0.0 (which was released today, and has been available for testing for more than a month). I wouldn't be surprised if those are different from the 2.15.2 tests. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R-3.0.0 reg-tests-3.R / survival
Any chance that you might have a personal library, which isn't versioned? If you do and you for some reason installed survival into it, it would explain it. E.g., I have, with the system-wide R > .libPaths() [1] "/Users/pd/Library/R/2.15/library" [2] "/opt/local/Library/Frameworks/R.framework/Versions/2.15/Resources/library" > lapply(.libPaths(), list.files) [[1]] [1] "abind" "aplpack""car""colorspace" "e1071" [6] "effects""ellipse""Hmisc" "ISwR" "leaps" [11] "lmtest" "matrixcalc" "mclust" "multcomp" "mvtnorm" [16] "pcaPP" "Rcmdr" "relimp" "represent" "rgl" [21] "robustbase" "rrcov" "sem""xtable" "zoo" [[2]] [1] "base" "boot" "class" "cluster""codetools" [6] "compiler" "datasets" "foreign""graphics" "grDevices" [11] "grid" "KernSmooth" "lattice""MASS" "Matrix" [16] "methods""mgcv" "nlme" "nnet" "parallel" [21] "rpart" "spatial""splines""stats" "stats4" [26] "survival" "tcltk" "tools" "utils" but the one in my development build tree of 3.0.0 has > .libPaths() [1] "/Users/pd/r-release-branch/BUILD-dist/library" If I explicitly set R_LIBS, I can easily reproduce your error. On Apr 3, 2013, at 17:00 , Paul Gilbert wrote: > > "make check" is failing on reg-test3.R with a message that survival was built > with an older version of R. (On my Ubuntu 32 bit and Ubuntu 64 bit > machines). Why would "make check" be looking anywhere that it would find > something built with an older version of R? > > ~/RoboAdmin/R-3.0.0/tests$ tail reg-tests-3.Rout.fail > > print(1.001, digits=16) > [1] 1.001 > > ## 2.4.1 gave 1.001 > > ## 2.5.0 errs on the side of caution. > > > > > > ## as.matrix.data.frame with coercion > > library(survival) > Error: package 'survival' was built before R 3.0.0: please re-install it > Execution halted > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R-package preparation --as-cran behaving unexpectedly
On 13-04-03 11:31 AM, Duncan Murdoch wrote: On 03/04/2013 7:25 AM, Stefan Boehringer wrote: Dear all, I am trying to submit an R-package to CRAN. In preparation I do run R_INSTALL_TAR=/bin/tar R CMD check --as-cran parallelize.dynamic_0.9.tar.gz and the command finishes without warnings or errors. As a final output I get NOTE: There was 1 note. See ‘.../Rpackages/parallelize.dynamic/parallelize.dynamic.Rcheck/00check.log’ for details. The file contains the standard output of the 'R CMD check ...' call precisely. If I submit this very tarball to CRAN I get rejected with warnings as reported from '--as-cran' checks there. In my case they are valid warnings about assignments in .GlobalEnv which I can certainly fix. However, my concern is about the discrepancy between the outputs of 'R CMD check --as-cran' runs locally as compared to the run on the CRAN-site. Any help is appreciated. I am running R version 2.15.2 (2012-10-26) -- "Trick or Treat" Platform: x86_64-unknown-linux-gnu (64-bit) Presumably CRAN is now running checks from 3.0.0 (which was released today, and has been available for testing for more than a month). I wouldn't be surprised if those are different from the 2.15.2 tests. Indeed, I think 2.15.3 tests running yesterday were slightly different from 2.15.2 tests. Paul Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Documentation error in subsitute
On Wed, Apr 3, 2013 at 10:38 AM, Hadley Wickham wrote: > Hi all, > > The documentation for substitute currently reads: > > Substitution takes place by examining each component of the parse > tree as follows: If it is not a bound symbol in ‘env’, it is > unchanged. If it is a promise object, i.e., a formal argument to > a function or explicitly created using ‘delayedAssign()’, the > expression slot of the promise replaces the symbol. If it is an > ordinary variable, its value is substituted, unless ‘env’ is > ‘.GlobalEnv’ in which case the symbol is left unchanged. > > Since the clause referring to the globalenv() is attached to the > discussion of ordinary variables, I thought that it implied that > > delayedAssign("a", "test") > substitute(a) > > would return "test" (but actually it returns quote(a)) > > I'd suggest rewording this paragraph to: > > Substitution takes place by examining each component of the parse > tree as follows: If it is not a bound symbol in ‘env’, it is > unchanged. If it is a promise object, i.e., a formal argument to > a function or explicitly created using ‘delayedAssign()’, the > expression slot of the promise replaces the symbol. If it is an > ordinary variable, its value is substituted. There's one important > exception to these rules: If 'env' is the ‘.GlobalEnv’, then no > substitution occurs. It acts differently in the global environment. Try this: > f <- function() { delayedAssign("a", "test"); substitute(a) } > f() [1] "test" -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R-3.0.0 reg-tests-3.R / survival
"make check" seems to be picking up the setting of my R_LIBS_SITE which is still set for 2.15.3 and had survival in it. At least, when I set that to empty then the check passes. I'm not sure if checking worked like that before, I don't think so. I have not usually had base packages in my site-library. In any case, it seems like a bad idea for "make check" to use an existing setting of R_LIBS_SITE. At least, I think the idea is that it should be checking the just built library. Paul On 13-04-03 11:36 AM, peter dalgaard wrote: Any chance that you might have a personal library, which isn't versioned? If you do and you for some reason installed survival into it, it would explain it. E.g., I have, with the system-wide R .libPaths() [1] "/Users/pd/Library/R/2.15/library" [2] "/opt/local/Library/Frameworks/R.framework/Versions/2.15/Resources/library" lapply(.libPaths(), list.files) [[1]] [1] "abind" "aplpack""car""colorspace" "e1071" [6] "effects""ellipse""Hmisc" "ISwR" "leaps" [11] "lmtest" "matrixcalc" "mclust" "multcomp" "mvtnorm" [16] "pcaPP" "Rcmdr" "relimp" "represent" "rgl" [21] "robustbase" "rrcov" "sem""xtable" "zoo" [[2]] [1] "base" "boot" "class" "cluster""codetools" [6] "compiler" "datasets" "foreign""graphics" "grDevices" [11] "grid" "KernSmooth" "lattice""MASS" "Matrix" [16] "methods""mgcv" "nlme" "nnet" "parallel" [21] "rpart" "spatial""splines""stats" "stats4" [26] "survival" "tcltk" "tools" "utils" but the one in my development build tree of 3.0.0 has .libPaths() [1] "/Users/pd/r-release-branch/BUILD-dist/library" If I explicitly set R_LIBS, I can easily reproduce your error. On Apr 3, 2013, at 17:00 , Paul Gilbert wrote: "make check" is failing on reg-test3.R with a message that survival was built with an older version of R. (On my Ubuntu 32 bit and Ubuntu 64 bit machines). Why would "make check" be looking anywhere that it would find something built with an older version of R? ~/RoboAdmin/R-3.0.0/tests$ tail reg-tests-3.Rout.fail print(1.001, digits=16) [1] 1.001 ## 2.4.1 gave 1.001 ## 2.5.0 errs on the side of caution. ## as.matrix.data.frame with coercion library(survival) Error: package 'survival' was built before R 3.0.0: please re-install it Execution halted __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Redefining quote() with reference classes (was: Ref classes initFields has incorrect environment?)
This should now be fixed in r-devel and 3.0.0 Patched as of revision 62487. On Mar 29, 2013, at 11:30 AM, John Chambers wrote: > Nothing to do with initFields. If you trace your redefined quote(), it's > called from the <<- assignment of x. > > The "x" element in the environment for the reference class object is > implemented as an active binding in order to enforce the class when assigning > the field. > > Effectively that makes the assignment behave like a reference class method, > and so ends up doing as() and getting back to the malware version of quote(). > > The fix will be to have a more bullet proof (and perhaps more efficient) > version of the active binding generated for fields. A better design anyway, > but this will take a little re-organization because the current default > binding function is generated by some code manipulation. > > Meanwhile the workaround is: Don't do what the revised subject heading says. > > John > > > On Mar 28, 2013, at 11:40 AM, Hadley Wickham wrote: > >> As suggested by the following code: >> >> A <- setRefClass("A", fields = list(x = "logical"), >> methods = list(initialize = function(...) { >> x <<- FALSE >> initFields(...) >> })) >> A$new() >> # Works as expected >> >> quote <- as.character >> A$new() >> # Error in function (value) : >> # invalid replacement for field ‘x’, should be from class “logical” >> or a subclass (was class “character”) >> >> I get the same error in: >> * R version 2.15.2 (2012-10-26) >> * R version 2.15.3 (2013-03-01) >> * R Under development (unstable) (2013-03-28 r62432) >> >> Hadley >> >> -- >> Chief Scientist, RStudio >> http://had.co.nz/ >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel