This document relies heavily on two posts:
- Writing an R package from scratch
- R Package Development Pictorial
- R-packages book by Hadley Wickham
- MIT Step by Step Instructions for Creating Your Own R Package by Kim, Martin, McMurry and Halterman
- R package usethis automates several steps described in R-packages
- rOpenSci Packaging Guide by rOpenSci community
- R package lintr for static code analysis
- R package style or the R function
usethis::use_tidy_style()
to prettify code
Workflow:
usethis::use_tidy_style()
lintr::lint_package()
- Travis CI guide by Travis-CI
- Advanced guide by Sebastian Wolf
Personal configuration for .travis.yml
file:
language: r
r:
- oldrel
- release
- devel
r_github_packages:
- jimhester/lintr
after_success:
- R CMD INSTALL $PKG_TARBALL
- Rscript -e 'covr::codecov()'
- Rscript -e 'lintr::lint_package()'
devtools::spell_check
spelling::spell_check_package
Workflow:
devtools::spell_check(".")
spelling::spell_check_package(".")
- R package
goodpractice
Workflow:
goodpractice::gp(".")
pkgdown::init()
pkgdown::build_site()