RMI-PACTA / r2dii.usethis

Automate Package And Project Setup
https://2degreesinvesting.github.io/r2dii.usethis
Other
1 stars 2 forks source link

r2dii.usethis

DEPRECATED

lifecycle CRAN
status Travis build
status R build
status Codecov test
coverage

The goal of r2dii.usethis is to automate the setup of r2dii packages and projects. It aims to be an extension of the usethis package, customize for 2 Degrees Investing Initiative.

Installation

# install.packages("devtools")
devtools::install_github("2DegreesInvesting/r2dii.usethis")

Example

r2dii.usethis::use_r2dii_data("new_data")
#> Add `new_data`
#> 
#> * [ ] Add "data-raw/new_data.csv" 
#> * [ ] Add "data-raw/data_dictionary/new_data.csv" 
#> * [ ] In "data-raw/new_data.R", add something like: 
#>   ```
#>   # Source: @<contributor> <URL to issue or pull request>
#>   new_data <- readr::read_csv(here::here("data-raw", "new_data.csv"))
#>   use_data(new_data, overwrite = TRUE)
#>   ```
#> * [ ] `usethis::use_r("new_data")`. Document `new_data` 
#> * [ ] `usethis::use_test("new_data")`. Add regression tests of `new_data` 
#> * [ ] `source("data-raw/data_dictionary.R"); devtools::load_all()` 
#> * [ ] `usethis::use_test("data_dictionary")`. Test `data_dictionary` includes `new_data`
usethis::use_template("README.Rmd", package = "r2dii.usethis")

Information