简体   繁体   中英

How to include static Vignettes in R Package using R.rsp

I would like to include static vignettes in my R package that will show up for users using the R function browseVignettes() .

I need the vignettes to be static because the vignettes take too long to build, causing me to fail CRAN checks on win-builder if they are included dynamically.

The package R.rsp seems to provide exactly what I want; described here: https://cran.r-project.org/web/packages/R.rsp/vignettes/R_packages-Static_PDF_and_HTML_vignettes.pdf .

I followed the instructions from R.rsp . I have a vignettes folder that contains a .html file with a corresponding .Rmd file and a .html.asis file, as directed. I also have the appropriate code in the DESCRIPTION file. With these settings, I pass CRAN tests on win-builder, travis, etc. However, when I download the package from github, it says that there are no vignettes associated with the package. Am I missing something about the R.rsp package? Is this capability outdated? Do I need to copy the built vignettes from the Vignettes folder into an inst/doc folder? (I have seen conflicting information about vignettes folder vs inst/doc folder).

Is using something like R.rsp::asis the best way to include vignettes that take too long to build to include dynamically? Another method that I have seen is to include the vignettes folder in .Rbuildignore, and then include a note in the README file telling users that they can build the vignettes separately from github in order to view them. I am also considering including links in the README to external vignettes. Is this a better approach? Which might CRAN prefer?

build_vignettes=TRUE添加到install_github调用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM