运行时devtools::check()
,我的包构建时出现我无法查明的错误。创建 R 包时有哪些调试选项可用?我正在寻找类似browser()
错误的东西。
由于找不到内部包变量而引发错误。该变量称为“hg19”并存储在 sysdata.rda 中。
── R CMD check ─────────────────────────────────────────────────────────────────
─ using log directory ‘/private/var/folders/md/4bf5wym92vsgqfbl4457psw40000gn/T/RtmpgCtpaV/mypackage.Rcheck’
─ using R version 3.6.0 (2019-04-26)
─ using platform: x86_64-apple-darwin15.6.0 (64-bit)
─ using session charset: UTF-8
─ using options ‘--no-manual --as-cran’ (575ms)
✔ checking for file ‘mypackage/DESCRIPTION’
─ this is package ‘mypackage’ version ‘0.0.0.9000’
─ package encoding: UTF-8
✔ checking package namespace information
✔ checking package dependencies (5.9s)
✔ checking if this is a source package
✔ checking if there is a namespace
✔ checking for executable files ...
✔ checking for hidden files and directories
✔ checking for portable file names
✔ checking for sufficient/correct file permissions ...
E checking whether package ‘mypackage’ can be installed (11.5s)
Installation failed.
See ‘/private/var/folders/md/4bf5wym92vsgqfbl4457psw40000gn/T/RtmpgCtpaV/mypackage.Rcheck/00install.out’ for details.
See
‘/private/var/folders/md/4bf5wym92vsgqfbl4457psw40000gn/T/RtmpgCtpaV/mypackage.Rcheck/00check.log’
for details.
── R CMD check results ──────────────────────────────── mypackage 0.0.0.9000 ────
Duration: 18.8s
❯ checking whether package ‘mypackage’ can be installed ... ERROR
See below...
── Install failure ─────────────────────────────────────────────────────────────
* installing *source* package ‘mypackage’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in get(genome) : object 'hg19' not found
Error: unable to load R code in package ‘mypackage’
Execution halted
ERROR: lazy loading failed for package ‘mypackage’
* removing ‘/private/var/folders/md/4bf5wym92vsgqfbl4457psw40000gn/T/RtmpgCtpaV/mypackage.Rcheck/mypackage’
1 error ✖ | 0 warnings ✔ | 0 notes ✔