zzz5-build_and_rebuild_package.Rmd
This code is used to build, re-build, and trouble shoot the building of the package, including
These are mostly commands that can be launched from within RStudio via the GUI, except pkgdown::build_site()
“This uses a fairly rudimentary algorithm where any files in ‘inst/doc’ with a name that exists in ‘vignettes’ are removed.”
devtools::clean_vignettes()
“Builds package vignettes using the same algorithm that R CMD build does”
devtools::build_vignettes()
devtools::load_all(".")
Single function to build whole site: “This will generate a docs/ directory. The home page will be generated from your package’s README.md, and a function reference will be generated from the documentation in the man/ directory.”
pkgdown::build_site()
pkgdown::clean_site (pkg = ".")
– Initializing site
pkgdown::init_site(pkg = ".")
Building home
pkgdown::build_home(pkg = ".")
Building function reference
pkgdown::build_reference(pkg = ".")
Build vignettes
pkgdown::build_articles(pkg = ".")
pkgdown::build_news()
https://stackoverflow.com/questions/16986422/r-create-reference-manual-with-r-cmd-check R CMD Rd2pdf mypackage
https://stackoverflow.com/questions/30607496/making-an-r-package-pdf-manual-using-devtools
pack <- "FACavian"
path <- find.package(pack)
system(paste(shQuote(file.path(R.home("bin"), "R")),
"CMD", "Rd2pdf", shQuote(path)))
remove manual
file.remove("FACavian.pdf")
“Clean and rebuild” ==> Rcmd.exe INSTALL –preclean –no-multiarch –with-keep.source mammalsmilk
“Install restart” ==> Rcmd.exe INSTALL –no-multiarch –with-keep.source mammalsmilk
devtools::check(env_vars = )
devtools::check()
See ‘C:/Users/lisanjie/Documents/1_R/git/git-aviary/FACavian.Rcheck/00install.out’ for details. Information on the location(s) of code generating the ‘Note’s can be obtained by re-running with environment variable R_KEEP_PKG_SOURCE set to ’yes’.