Description Usage Arguments Details Value See Also Examples
Wrapper function around several package setup functions from the usethis
and pkgpeanuts
packages.
1 2 3 4 5 6 7 8 9 10 | pour(path = ".", account, name = NULL, description = NULL,
license = c("mit", "gpl3", "apl2", "cc0"), host = "github",
public = TRUE, testthat = TRUE, pkgdown = TRUE, appveyor = TRUE,
travis = TRUE, codecov = TRUE, lintr = c("none", "user", "test"),
revdep = TRUE, data_raw = TRUE, hex = TRUE, news = TRUE,
code_of_conduct = TRUE, cran_comments = TRUE,
clone_comments = TRUE, readme = TRUE, vignette = TRUE,
depends = NULL, imports = NULL, suggests = NULL, remotes = NULL,
spellcheck = TRUE, tibble = FALSE, pipe = FALSE,
github_args = NULL)
|
path |
character, package directory. Package name used by |
account |
character, user account. |
name |
character, given and family name |
description |
a named list providing fields to |
license |
character, one of |
host |
|
public |
logical, public remote repository. |
testthat |
logical, use |
pkgdown |
logical, use |
appveyor |
logical, use Appveyor. Applicable if |
travis |
logical, use Travis-CI. Applicable if |
codecov |
logical, use |
lintr |
character, use |
revdep |
logical, use revdep. |
data_raw |
logical, use |
hex |
logical, place default hex sticker package logo at |
news |
logical, use |
code_of_conduct |
logical, include |
cran_comments |
logical, add |
clone_comments |
logical, add |
readme |
logical, add |
vignette |
logical, add package vignette template. |
depends |
character, vector of dependencies, e.g., |
imports |
character, as above. |
suggests |
character, as above. |
remotes |
character, as above. |
spellcheck |
logical, spell checking as unit test and add |
tibble |
logical, for importing and re-exporting |
pipe |
logical, for importing and re-exporting |
github_args |
named list, if you need to provide arguments to |
Run this function from the new package's root directory. The project should be brand new, but must exist. Make a new package project in RStudio.
The eventual goal is to start a project from scratch, but currently this does not work due to issues involving git2r
and usethis
and making the initial git commit and push to new GitHub remote repo.
For now, just leave path = "."
.
pour
wraps around the following functions: use_description
, use_license
,
use_github_links
, use_clone_comments
, use_cran_comments
,use_data_raw
, use_news_md
,
use_testthat
, use_vignette
, use_readme_rmd
, use_revdep
, use_lintr
, use_appveyor
,
use_travis
, use_coverage
, use_hex
, and others. Most are optional, see arguments.
If using lintr
with the new package, set lintr = "user"
for interactive-only use of the lintr
package.
Set to "test"
for setting up linting as a component of unit testing. The default is lintr = "none"
.
See use_lintr
for important details regarding unit testing with lintr
in an R package.
If hex = TRUE
, the default logo.png
will not be created if the magick
package is not installed.
Instead, a message is printed notifying of this requirement. Being able to generate a default logo (that will surely be replaced later) is a very minor and unimportant feature.
Therefore, pkgpeanuts
does not have package dependencies or system requirements in this regard. This is optional.
If pkgdown = TRUE
, a pkgdown
site for R package documentation is also initialized, using a pkgdown
directory in the package root
directory containing template _pkgdown.yml
and extra.css
files.
The docs
directory is initially set for package website files and should be specified likewise in the remote repository settings for hosting.
side effect of setting up various package files and configurations.
use_lintr
, use_hex
, use_clone_comments
, update_readme_rmd
1 2 | # Create new R package project with RStudio. Run command inside package root directory, e.g.:
## Not run: pour(account = "github_username")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.