[Rd] Deprecating old pkgDepends(), package.dependencies() in tools
We will deprecate the functions pkgDepends(), package.dependencies() and 2-3 less prominent ones from package tools, in R's development version (short "R-devel"), i.e., the one that will probably become R 3.3.0 sometime in April. Instead, package_dependencies() should be used, possibly after non-default use of available.packages() to be used as argument 'db', i.e., conceptually package_dependencies(pkg, db = available.packages(.), .) The reason for deprecation is that some of these functions only work with "Depends", but never with "Imports", etc, i.e., that code has really been written with 'Depends' only in mind and hence has not been really useful anymore for a while. OTOH, package.dependencies() similarly only uses *one* of "Depends", "Imports", "Suggests", as opposed to the newer and much better designed alternative package_dependencies() To our knowledge there are only four (of > 7600) CRAN packages affected (("FSA", "Zelig", "checkpoint", "packdep") whose maintainers are addressed via BCC of this e-mail) and the one or two Bioconductor packages should have been updated since we talked about this issue R-core internally. The "R version dependency" that package.dependencies() have provided seems to be sufficiently available when creating the package list via available.packages(*, filters = ..). If you are using one of the deprecated functions and hence will get a warning, and find it hard to replace that use by a combination of available.packages() and package_dependencies() {note the "_"}, please ask here, as we may have overlooked edge cases. This should make this part of tools-package functionality easier to maintain (and teach etc). Martin Maechler __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Question about CHARSXP and garbage collection
Hi, I had a technical question about CHARSXP and garbage collection and couldn't find the answer in the R manual. The question is this. Are CHARSXP garbage collected like any other object, despite being part of the CHARSXP cache? i.e. is the cache being cleaned by garbage collection regularly and therefore, when I am in C code, do I need to protect a CHARSXP? Thanks! Holger [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Question about CHARSXP and garbage collection
They are garbage collected so you do need to protect them in C code. Best, luke On Sat, 13 Feb 2016, Holger Hoefling wrote: Hi, I had a technical question about CHARSXP and garbage collection and couldn't find the answer in the R manual. The question is this. Are CHARSXP garbage collected like any other object, despite being part of the CHARSXP cache? i.e. is the cache being cleaned by garbage collection regularly and therefore, when I am in C code, do I need to protect a CHARSXP? Thanks! Holger [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics andFax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke-tier...@uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Show rapply(how="replace") as alternative to 'dendrapply' to change leaves?
A non-leaf dendrogram object in R is a list, possibly nested. In R-devel, rapply() preserves attributes on the list when how = "replace". So, the result of applying rapply(how = "replace") to such a dendrogram object is a dendrogram object. Usually, non-list components of such a dendrogram object are the leaves. So, rapply(how = "replace") can be used to change leaves only of such a dendrogram object. For such case, it is an alternative to 'dendrapply'. How about showing it in the documentation? In particular, in examples for 'dendrapply', creation of 'dL' can alternatively use something like the following. local({ colLabLeaf <<- function(n) { a <- attributes(n) i <<- i+1 attr(n, "nodePar") <- c(a$nodePar, list(lab.col = mycols[i], lab.font = i%%3)) n } mycols <- grDevices::rainbow(attr(dhc21,"members")) i <- 0 }) dL <- rapply(dhc21, colLabLeaf, how = "replace") __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel