create_bcgov_package: Create a bcgov R package directory structure

Description Usage Arguments Examples

View source: R/create.R

Description

Create a package directory structure for a new bcgov R package in your current working directory.

Usage

1
2
3
4
5
6
7
create_bcgov_package(
  path = ".",
  rmarkdown = TRUE,
  coc_email = get_coc_email(),
  rstudio = rstudioapi::isAvailable(),
  open = TRUE
)

Arguments

path

Path to the directory in which to initialize the project. Default "." - your current working directory.

rmarkdown

Should an Rmarkdown file be added to the repository with its corresponding markdown file? Default TRUE.

coc_email

Contact email address(es) for the Code of Conduct. It is recommended that you save this setting by adding a line like: options("bcgovr.coc.email" = "your.email@gov.bc.ca") to your .Rprofile. Use usethis::edit_r_profile() for an easy way to find and edit this file.

rstudio

If TRUE, calls usethis::use_rstudio() to make the new project into an RStudio Project. If FALSE, a .here file is created so that the directory can be recognized as a project by the here or rprojroot packages.

open

If TRUE and in RStudio, the new project is opened in a new instance, if possible, or is switched to, otherwise.

Examples

1
2
3
4
## Not run: 
 bcgovr::create_bcgov_package()

## End(Not run)

bcgov/bcgovr documentation built on Oct. 11, 2021, 2:02 p.m.