The goal of templateRepository is to provide template files for setting up a GitHub repository, including:
- README.md with information about the package and clear usage instructions
- R package skeleton set up using
devtools::create() - tests/ folder initialised with
usethis::use_test() - GitHub Actions templates set up with
usethis::use_github_action() - Pre-commit hooks set up with {precommit} package
This project depends on the R packages listed in the DESCRIPTION file. It also relies on the upstream repositories at ...
The following downstream repositories depend on this package ...
You can install the development version of templateRepository from GitHub with:
# install.packages("devtools")
devtools::install_github("myles-mitchell/templateRepository")The add.R script contains a function add(a, b) which takes two numerical
arguments and adds them together.
This is a basic example which shows you how to solve a common problem:
library(templateRepository)
add(2, 3)To run the tests, open the package in RStudio and hit Ctrl+Shift+T.
Alternatively you can run devtools::test().