[Rcpp-devel] Error creating package with RcppArmadillo
Kevin Ushey
kevinushey at gmail.com
Sat Oct 13 19:42:43 CEST 2018
I can reproduce if the 'pkgKitten' package is not installed. In that
case, I see in man/<pkg>-package.Rd:
\examples{
~~ simple examples of the most important functions ~~
}
which of course is just a stub and not valid example code (and so
fails during check).
I think this is just gunk that gets inserted by R's own
package.skeleton(), which pkgKitten normally tries to clean up for
you. See e.g.
https://github.com/wch/r-source/blob/ff36007c3562e8c7a8517ae15196429fd9f8fb6d/src/library/utils/R/prompt.R#L379-L380
tl;dr: install pkgKitten and make your life easier.
Best,
Kevin
On Fri, Oct 12, 2018 at 1:18 PM Dirk Eddelbuettel <edd at debian.org> wrote:
>
>
> On 12 October 2018 at 14:59, mike guggis wrote:
> | I am running into an error when building the default package with Rcpp
> | armadillo in Rstudio.
> |
> |
> |
> | In rstudio if I go to New Project > New directory> R Package using
> | RcppArmadillo. Then create a project with a random nam,e “gh”. If I click
> | “check” under the build tab to check the package I get an error when
> | rstudio gets to the “checking examples” part. It gives me the error
> |
> |
> |
> | - checking examples ... (434ms)
> |
> | ** running examples for arch 'i386' ... ERROR
> |
> | Running examples in 'gh-Ex.R' failed
> |
> | The error most likely occurred in:
> |
> |
> |
> | > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> |
> | > ### Name: gh-package
> |
> | > ### Title: What the package does (short line)
> |
> | > ### Aliases: gh-package gh
> |
> | > ### Keywords: package
> |
> | >
> |
> | > ### ** Examples
> |
> | >
> |
> | > ~~ simple examples of the most important functions ~~
> |
> | Error: unexpected symbol in "~~ simple examples"
> |
> | Execution halted
> |
> | ** running examples for arch 'x64' ... ERROR
> |
> | Running examples in 'gh-Ex.R' failed
> |
> | The error most likely occurred in:
> |
> |
> |
> | > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> |
> | > ### Name: gh-package
> |
> | > ### Title: What the package does (short line)
> |
> | > ### Aliases: gh-package gh
> |
> | > ### Keywords: package
> |
> | >
> |
> | > ### ** Examples
> |
> | >
> |
> | > ~~ simple examples of the most important functions ~~
> |
> |
> |
> |
> |
> | My Rstudio version is 1.1.456. My session info with RCpp and RCppArmadillo
> | loaded is
>
> Thanks for posting versions. This sounds ... weird.
>
> 1) The issue of 'failing' over these left-overs from the skeleton annoyed me
> so much (many years ago!!) that I wrote a new helper package 'pkgKitten'.
>
> 2) 'pkgKitten' is used (if present) by
> Rcpp.package.skeleton() # in Rcpp
> RcppArmadillo.package.skeleton() # in RcppArmadillo
>
> 3) They work.
>
> 4) I just tried your example (of using RStudio's facilities -- which I also
> use regularly) and COULD NOT reproduce this on
> RStudio 1.1.456
> RStudio 1.2.1030
>
> So I am stumped. Kevin: Any idea?
>
> Dirk
>
>
> | > sessionInfo()
> |
> | R version 3.5.1 (2018-07-02)
> |
> | Platform: x86_64-w64-mingw32/x64 (64-bit)
> |
> | Running under: Windows >= 8 x64 (build 9200)
> |
> |
> |
> | Matrix products: default
> |
> |
> |
> | locale:
> |
> | [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
> | States.1252
> |
> | [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> |
> | [5] LC_TIME=English_United States.1252
> |
> |
> |
> | attached base packages:
> |
> | [1] stats graphics grDevices utils datasets methods base
> |
> |
> |
> | other attached packages:
> |
> | [1] RcppArmadillo_0.9.100.5.0 Rcpp_0.12.19
> |
> |
> |
> | loaded via a namespace (and not attached):
> |
> | [1] compiler_3.5.1 rsconnect_0.8.8 tools_3.5.1 yaml_2.2.0
> |
> |
> |
> | Any help you can provide would be appreciated.
> | _______________________________________________
> | Rcpp-devel mailing list
> | Rcpp-devel at lists.r-forge.r-project.org
> | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
More information about the Rcpp-devel
mailing list