Wraps the other use_*_usgs functions to initialize
multiple files in one directory.
Usage
use_project_usgs(
home = ".",
gitignore_additions = NULL,
readme_type = c("md", "rmd"),
disclaimer_type = c("provisional", "approved"),
repo_url = get_usgs_gitlab_url("origin"),
use_mr_template = TRUE,
open = rlang::is_interactive()
)Arguments
- home
chr, root directory of project. Defaults to current working directory.
- gitignore_additions
chr vector, other files/directories to be added to .gitignore or
NULL(default) for no additions.- readme_type
chr, either "md" to create README as a markdown file (README.md; default) or "rmd" to create it as an R markdown file (README.Rmd). Using an Rmd file will allow you to include R code and output in your README.md.
- disclaimer_type
chr, either "provisional" (default) to include the provisional software disclaimer statement or "approved" for the approved disclaimer statement. It is important to only include the approved disclaimer statement if your software is an approved software release.
- repo_url
chr, URL to Git repository. If
NULL(default) a generic URL will be provided as a link to the repository in CONTRIBUTING.md. Otherwise, the issue page forrepo_urlwill be used as the link.- use_mr_template
lgl, Should GitLab Merge Request template be included in project repository. Default is
TRUE.- open
lgl; whether to open the files for interactive editing.
Examples
if (FALSE) { # \dontrun{
tmp <- tempdir()
unlink(tmp, recursive = TRUE, force = TRUE)
dir.create(tmp)
use_project_usgs(home = tmp)
list.files(tmp)
# start over
unlink(tmp, recursive = TRUE, force = TRUE)
dir.create(tmp)
# creates README.Rmd and DISCLAIMER_APPROVED instead
use_project_usgs(home = tmp, readme_type = "rmd", disclaimer_type = "approved")
list.files(tmp)
} # }