cran

Preparing for CRAN: '-fopenmp' clang error?

早过忘川 提交于 2019-12-24 09:58:32
问题 I am preparing a package (which makes use of Rcpp and RcppArmadillo) for submission to CRAN. I am using Travis CI and I have included the following to test my package more thoroughly: os: - linux - osx compiler: - clang - gcc This, however, yields the (familiar, it seems) error when using clang on OS X * installing *source* package ‘my_pkg’ ... ** libs clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"/Users/travis/R/Library/Rcpp/include" -I"/Users/travis/R/Library

CRAN package check finds warning that R CMD check --as-cran doesn't

耗尽温柔 提交于 2019-12-24 02:45:44
问题 I recently submitted a package to CRAN and received the following errors. WARNING: ignoring environment value of R_HOME checking for code which exercises the package ... WARNING No examples, no tests, no vignettes I ran R CMD check --as-cran using R 3.0.2 on OSX and the only note reported was 'New submission'. No warnings were reported. Is there an alternate way to run all of the tests that CRAN will run on a package before submitting it? 回答1: Yes. By using win builder http://win-builder.r

h2oensemble Error in value[[3L]](cond) : argument “training_frame” must be a valid H2O H2OFrame or id

若如初见. 提交于 2019-12-24 01:55:27
问题 While trying to run the example on H2OEnsemble found on http://learn.h2o.ai/content/tutorials/ensembles-stacking/index.html from within Rstudio, I encounter the following error: Error in value[3L] : argument "training_frame" must be a valid H2O H2OFrame or id after defining the ensemble fit <- h2o.ensemble(x = x, y = y, training_frame = train, family = family, learner = learner, metalearner = metalearner, cvControl = list(V = 5, shuffle = TRUE)) I installed the latest version of both h2o and

Determine number of versions in history of R package on CRAN

爱⌒轻易说出口 提交于 2019-12-23 10:47:07
问题 Is it possible to determine the number of versions a package on CRAN has had in the past? 回答1: Here's one using the XML package. This just counts the archived versions (more precisely, the number of archived tar.gz files). Add 1 to get the total number of versions, including the current. nCRANArchived <- function(pkg) { link <- paste0("http://cran.r-project.org/src/contrib/Archive/", pkg) qry <- XML::getHTMLLinks(link, xpQuery = "//@href[contains(., 'tar.gz')]") length(qry) } nCRANArchived(

R CMD build skips knitr/Rmd vignettes - “Output(s) listed in 'build/vignette.rds' but not in package”

て烟熏妆下的殇ゞ 提交于 2019-12-23 10:14:20
问题 I have built an rmarkdown tutorial for an R package, and would like to include the compiled file when the package is built. Though the file compiles happily (including when I use R CMD Sweave to do so), I don't seem to be able to include it in a binary. Specifically, when I run R CMD BUILD I get * checking for file ‘./DESCRIPTION’ ... OK [snip] * installing the package to build vignettes * creating vignettes ... OK * checking for empty or unneeded directories Removed empty directory ‘rentrez

Did the subdirectory structure of package repositories change as of R 2.15.2?

社会主义新天地 提交于 2019-12-23 03:50:12
问题 Kind of embarrassing / a no-go, but since it hasn't been that long that I've moved from "pure user" to "beginner-developer", I've never actually read the CHANGELOG when a new R version came out - well until today (and I have the feeling I should make this a habbit) ;-) Yet I'm not sure if the supposed change actually occurred since I couldn't find anything about it at a first glimpse at the CHANGELOG of R R 2.15.2: Actual question Is it possible that the (subdirectory) structure of package

R submit to CRAN: which R version to build package?

一世执手 提交于 2019-12-22 18:45:32
问题 I want to submit a package to CRAN. In the CRAN repository policy it states that "Packages for which R CMD check gives an ‘ERROR’ when a new R x.y.0 version is released will be archived" . It also says "Please ensure that R CMD check --as-cran has been run on the tarball to be uploaded before submission" . Running R CMD check --as cran on my tarball gives me the warning: Warning: unknown option ‘--as-cran’ I am running R version 2.14.1 on Ubuntu 12.04.2 LTS. Can I build a source package using

R package dependencies

核能气质少年 提交于 2019-12-22 03:59:12
问题 i'm trying to build a R package, but it seems that there are some problems with the package dependencies. If I run the code in R, I need the packages "rgdal" and "rgeos", so for creatng the package out of it, I: Added the line "import(rgdal, rgeos)" to the NAMESPACE file Added the line "Depends: rgeos, rgdal" to the DESCRIPTION file When I run R CMD check (after build) I got an error which says: * checking package dependencies ... ERROR Benötigte, aber nicht verfügbare Pakete: 'rgeos' 'rgdal'

How do I add a Changelog or NEWS file to my R package?

你说的曾经没有我的故事 提交于 2019-12-21 06:49:03
问题 I have a package on CRAN that I would like to add a ChangeLog for, but I cannot find information anywhere on how to do this. I looked on the "Writing R Extensions" document that CRAN provides, but it only mentions ChangeLogs and gives no direction (I could find) about how to create one. I noticed from downloading tarballs from other packages on CRAN (e.g. seacarb ) that their ChangeLogs are Unix Executable Files (I'm on a Mac) so that's not too helpful. I imagine this is a common problem, but

How to check if a CRAN mirror is outdated?

别来无恙 提交于 2019-12-21 04:24:09
问题 R users are advised to download R and R packages from local CRAN mirrors. But some are outdated. Is there an easy way to check if a repository is outdated? Any function in R that does that? 回答1: One way is to look at $CRANMIRROR/src/contrib and sort by date (by clicking twice on date) so that you can compare the most recent package on the mirror on what the master host carries. Beyond that, you could use R itself and point available.packages() at the master as well as at a mirror -- if the