[Rd] install.packages deletes PACKAGES file in local repo
Hi, running install.packages() to install a package from a local repository (i.e., starts with file:///) appears to delete the PACKAGES file that is in the src/contrib/ directory. This happens on a cluster running Scientific Linux release 6.4 (Carbon), but not on my Ubuntu local machine. Subsequent calls to install.packages() complain about src/contrib/PACKAGES not existing, although there still is a src/contrib/PACKAGES.gz file. Is this a know issue? Thank you. Bests, Renaud [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Use of tools:::httpdPort in a package for CRAN.
Hello, I wrote a function to show the help/index page of a package in a browser (and want to include this in an update for a CRAN package). I asked in R-help how to obtain the 00Index.html file, Duncan Murdoch suggested to inspect (see http://r.789695.n4.nabble.com/Obtain-00Index-html-tt4697661.html) tools:::httpd (thank you therefore!). So I came up with: help.index <- function (pkg, browser = NA, encodeIfNeeded = FALSE) { pkg <- as.character(substitute(pkg)) hport <- tools:::httpdPort if (!pkg %in% rownames(installed.packages())) stop(paste("Package", pkg, "not found.")) if (hport == 0) { cat("Starting dynamic help.\n") t <- try(startDynamicHelp(), silent = TRUE) if (class(t) == "try-error") stop("Could not start dynamic help.") hport <- tools:::httpdPort } if (!is.na(browser)) { if (tolower(browser) == "rstudio") options(browser = function (x) .Call("rs_browseURL", url)) else options(browser = browser) } url <- paste0("http://127.0.0.1:";, hport, "/library/", pkg, "/html/00Index.html") browseURL(url, encodeIfNeeded = encodeIfNeeded) invisible(NULL) } (also at https://github.com/setempler/miscset/blob/master/R/help.index.R) I tried to avoid `:::` so I used the 00Index.html file from the library on my disk (like /home/user.foo/R/lib.bar/package.baz/html/00Index.html). It does show the index, but the link to the help pages are not accessible. Nevertheless, my implementation now works, but R CMD check --as-cran gives a warning, and the R help also says to avoid `:::`. Also get(httpd, as.environment("package:tools")) didn't help. My question: do I have another possibility to achieve my goal without referencing by `:::` (concerning a submission to CRAN), if so, please tell me! Thank you in advance, Sven. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Use of tools:::httpdPort in a package for CRAN.
On 05/12/2014 11:24 AM, Sven E. Templer wrote: Hello, I wrote a function to show the help/index page of a package in a browser (and want to include this in an update for a CRAN package). I asked in R-help how to obtain the 00Index.html file, Duncan Murdoch suggested to inspect (see http://r.789695.n4.nabble.com/Obtain-00Index-html-tt4697661.html) tools:::httpd (thank you therefore!). So I came up with: help.index <- function (pkg, browser = NA, encodeIfNeeded = FALSE) { pkg <- as.character(substitute(pkg)) hport <- tools:::httpdPort I don't see any way to get it other than this, but it seems like a reasonable thing to want to do. I think the way I'd do it is to modify the exported function startDynamicHelp() so that it doesn't give an error if the help system is already running, it just returns the active port number. So the code above would become hport <- startDynamicHelp() (or some variation using try().) I think a change like this could make it into 3.1.3 and later versions. Duncan Murdoch if (!pkg %in% rownames(installed.packages())) stop(paste("Package", pkg, "not found.")) if (hport == 0) { cat("Starting dynamic help.\n") t <- try(startDynamicHelp(), silent = TRUE) if (class(t) == "try-error") stop("Could not start dynamic help.") hport <- tools:::httpdPort } if (!is.na(browser)) { if (tolower(browser) == "rstudio") options(browser = function (x) .Call("rs_browseURL", url)) else options(browser = browser) } url <- paste0("http://127.0.0.1:";, hport, "/library/", pkg, "/html/00Index.html") browseURL(url, encodeIfNeeded = encodeIfNeeded) invisible(NULL) } (also at https://github.com/setempler/miscset/blob/master/R/help.index.R) I tried to avoid `:::` so I used the 00Index.html file from the library on my disk (like /home/user.foo/R/lib.bar/package.baz/html/00Index.html). It does show the index, but the link to the help pages are not accessible. Nevertheless, my implementation now works, but R CMD check --as-cran gives a warning, and the R help also says to avoid `:::`. Also get(httpd, as.environment("package:tools")) didn't help. My question: do I have another possibility to achieve my goal without referencing by `:::` (concerning a submission to CRAN), if so, please tell me! Thank you in advance, Sven. __ 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] Use of tools:::httpdPort in a package for CRAN.
Perhaps I missed something, but isn't this just a one-liner function? help.index = function (pkg) help(package = (pkg), help_type = "html") Regards, Yihui -- Yihui Xie Web: http://yihui.name On Fri, Dec 5, 2014 at 10:24 AM, Sven E. Templer wrote: > Hello, > > I wrote a function to show the help/index page of a package in a > browser (and want to include this in an update for a CRAN package). I > asked in R-help how to obtain the 00Index.html file, Duncan Murdoch > suggested to inspect (see > http://r.789695.n4.nabble.com/Obtain-00Index-html-tt4697661.html) > tools:::httpd (thank you therefore!). So I came up with: > > > help.index <- function (pkg, browser = NA, encodeIfNeeded = FALSE) { > > pkg <- as.character(substitute(pkg)) > hport <- tools:::httpdPort > > if (!pkg %in% rownames(installed.packages())) > stop(paste("Package", pkg, "not found.")) > > if (hport == 0) { > cat("Starting dynamic help.\n") > t <- try(startDynamicHelp(), silent = TRUE) > if (class(t) == "try-error") > stop("Could not start dynamic help.") > hport <- tools:::httpdPort > } > > if (!is.na(browser)) { > if (tolower(browser) == "rstudio") > options(browser = function (x) .Call("rs_browseURL", url)) > else > options(browser = browser) > } > > url <- paste0("http://127.0.0.1:";, hport, "/library/", pkg, > "/html/00Index.html") > browseURL(url, encodeIfNeeded = encodeIfNeeded) > invisible(NULL) > > } > > (also at https://github.com/setempler/miscset/blob/master/R/help.index.R) > > I tried to avoid `:::` so I used the 00Index.html file from the > library on my disk (like > /home/user.foo/R/lib.bar/package.baz/html/00Index.html). It does show > the index, but the link to the help pages are not accessible. > Nevertheless, my implementation now works, but R CMD check --as-cran > gives a warning, and the R help also says to avoid `:::`. Also > get(httpd, as.environment("package:tools")) didn't help. > > My question: do I have another possibility to achieve my goal without > referencing by `:::` (concerning a submission to CRAN), if so, please > tell me! > > Thank you in advance, > Sven. > > __ > 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] install.packages deletes PACKAGES file in local repo
Can you post exact code, i have not seen this behavior, and I work with local repositories quite extensively on my current project. ~G On Fri, Dec 5, 2014 at 7:45 AM, Renaud Gaujoux < ren...@mancala.cbio.uct.ac.za> wrote: > Hi, > > running install.packages() to install a package from a local repository > (i.e., starts with file:///) appears to delete the PACKAGES file that is in > the src/contrib/ directory. > This happens on a cluster running Scientific Linux release 6.4 (Carbon), > but not on my Ubuntu local machine. > > Subsequent calls to install.packages() complain about src/contrib/PACKAGES > not existing, although there still is a src/contrib/PACKAGES.gz file. > > Is this a know issue? > Thank you. > > Bests, > Renaud > > [[alternative HTML version deleted]] > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Gabriel Becker Graduate Student Statistics Department University of California, Davis [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R CMD check --as-cran and (a)spell checking
Does anyone know if it is possible to add a dictionary file of known words that becomes part of the *built* package to tell 'R CMD check --as-cran' not to report these words as misspelled. I want this dictionary to come with the *.tar.gz such that it will be available regardless where the package is checked. For instance, currently I get: * using log directory 'T:/R/_R-3.1.2patched/matrixStats.Rcheck' * using R version 3.1.2 Patched (2014-12-03 r67101) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'matrixStats/DESCRIPTION' ... OK * this is package 'matrixStats' version '0.12.0' * checking CRAN incoming feasibility ... NOTE Maintainer: 'Henrik Bengtsson ' Possibly mis-spelled words in DESCRIPTION: rowMedians (18:74) rowRanks (18:92) rowSds (18:111) * checking package namespace information ... OK ... Thanks Henrik __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] does parLapplyLB do load-balancing?
Looking at parLapplyLB, one sees that it takes in X and then passes splitList(X, length(cl)) to clusterApplyLB, which then calls dynamicClusterApply. Thus while dynamicClusterApply does handle tasks in a load-balancing fashion, sending out individual tasks as previous tasks complete, parLapplyLB preempts that by splitting up the tasks in advance into as many groups of tasks as there are cluster processes. This seems to defeat the purpose of load-balancing and of the manner in which dynamicClusterApply is coded. This question basically repeats a question posed in 2013 -- see http://r.789695.n4.nabble.com/parLapplyLB-Load-balancing-tt4671848.html I'm reposting because there doesn't seem to have been any response to the previous posting, and it looks like the issue is still present in R 3.1 so it seems asking again if this is the intended behavior of parLapplyLB. I'm using R 3.1.1 and the 3.1.1 version of the parallel package under Ubuntu 14.04, but the code appears to be the same in R-devel. Chris -- Chris Paciorek Statistical Computing Consultant Statistical Computing Facility, Econometrics Laboratory, Berkeley Research Computing Office: 495 Evans Hall Email: pacio...@stat.berkeley.edu Mailing Address:Voice: 510-842-6670 Department of StatisticsFax: 510-642-7892 367 Evans Hall Skype: cjpaciorek University of California, Berkeley WWW: www.stat.berkeley.edu/~paciorek Berkeley, CA 94720 USA Permanent forward: pacio...@alumni.cmu.edu __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] install.packages deletes PACKAGES file in local repo
Hi, I was only doing install.packages('pkgname'), with the local repo being defined in the default repos option. After retrying it just now, this issue mysteriously suddenly disappeared, and things work as expected whether on the front node or in a job on a node. Really no idea of what happened. Closing the thread. Thanks. On 6 December 2014 at 02:23, Gabriel Becker wrote: > Can you post exact code, i have not seen this behavior, and I work with > local repositories quite extensively on my current project. > > ~G > > On Fri, Dec 5, 2014 at 7:45 AM, Renaud Gaujoux < > ren...@mancala.cbio.uct.ac.za> wrote: > >> Hi, >> >> running install.packages() to install a package from a local repository >> (i.e., starts with file:///) appears to delete the PACKAGES file that is >> in >> the src/contrib/ directory. >> This happens on a cluster running Scientific Linux release 6.4 (Carbon), >> but not on my Ubuntu local machine. >> >> Subsequent calls to install.packages() complain about src/contrib/PACKAGES >> not existing, although there still is a src/contrib/PACKAGES.gz file. >> >> Is this a know issue? >> Thank you. >> >> Bests, >> Renaud >> >> [[alternative HTML version deleted]] >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > > > -- > Gabriel Becker > Graduate Student > Statistics Department > University of California, Davis > [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] does parLapplyLB do load-balancing?
Hello, In such cases, try the Rhpc package. The following is the result of the benchmark. http://prs.ism.ac.jp/~nakama/Rhpc/#benchmark # but tuning is not finished... 2014-12-06 10:36 GMT+09:00 Chris Paciorek : > Looking at parLapplyLB, one sees that it takes in X and then passes > splitList(X, length(cl)) to clusterApplyLB, which then calls > dynamicClusterApply. Thus while dynamicClusterApply does handle tasks > in a load-balancing fashion, sending out individual tasks as previous > tasks complete, parLapplyLB preempts that by splitting up the tasks in > advance into as many groups of tasks as there are cluster processes. > This seems to defeat the purpose of load-balancing and of the manner > in which dynamicClusterApply is coded. > > This question basically repeats a question posed in 2013 -- see > http://r.789695.n4.nabble.com/parLapplyLB-Load-balancing-tt4671848.html > > I'm reposting because there doesn't seem to have been any response to > the previous posting, and it looks like the issue is still present in > R 3.1 so it seems asking again if this is the intended behavior of > parLapplyLB. > > I'm using R 3.1.1 and the 3.1.1 version of the parallel package under > Ubuntu 14.04, but the code appears to be the same in R-devel. > > > Chris > > > -- > Chris Paciorek > > Statistical Computing Consultant > Statistical Computing Facility, Econometrics Laboratory, Berkeley > Research Computing > > Office: 495 Evans Hall Email: pacio...@stat.berkeley.edu > Mailing Address:Voice: 510-842-6670 > Department of StatisticsFax: 510-642-7892 > 367 Evans Hall Skype: cjpaciorek > University of California, Berkeley WWW: > www.stat.berkeley.edu/~paciorek > Berkeley, CA 94720 USA Permanent forward: > pacio...@alumni.cmu.edu > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Best Regards, -- Eiji NAKAMA "\u4e2d\u9593\u6804\u6cbb" __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel