Tools to develop RECON packages
Not yet on CRAN
To install the most recent development version use:
What does it do?
When starting a new RECON package, you can use
init_package to quickly create a default package structure:
# from within your session recontools::init_package("mynewpackage") # you can also set a specific path for the new package recontools::init_package("mynewpackage", path = "my_new_package_dir") # you can also disable the CRAN checks recontools::init_package("mynewpackage", check_cran_name = FALSE)
In case you want to create a new package from the command line, run:
Rscript -e "recontools::init_package('mynewpackage')"
Please note that using
Rscript creates all optional components (like the MIT license) without asking.
init_package currently does the following:
- Checks if the package name is valid and already taken on CRAN
- Initializes a git repository, if not already present
- Creates default
- Creates an
- Creates a default
- Adds an MIT License (asks for it)
- Adds a code of conduct (from the
- Creates a default
- Creates a sample vignette
- Adds travis CI + codecov (asks for it)
- Adds appveyor (asks for it)
- Adds a default
- Adds a
You can also run package checks for a given package.
# from within your session in a package directory recontools::check_package() # to enable goodpractice::gp checks do recontools::check_package(run_gp = TRUE)
check_package does the following:
recontools::check_package(run_gp = FALSE) #> Running RECON specific tests: #> x Packages should have at least one rmarkdown vignette #> ✓ Packages should not import functions in NAMESPACE but use :: instead #> ✓ Packages should have a NEWS.md file #> ✓ Packages should have tests #> ✓ Packages should use roxygen2 #> ✓ Packages should use snake case in exported functions #> ✓ Packages should have a URL in the DESCRIPTION #> ✓ Packages should have a URL for bugreports in the DESCRIPTION #> x Packages should have a docs folder or a gh-pages branch. #> ✓ Packages should use travis CI for Linux/Mac testing #> ✓ Packages should use appveyor CI for Windows testing #> #> Consider fixing the issues identified above. #> However, your package is already phenomenal!