devtools (version 1.11.0)

infrastructure: Add useful infrastructure to a package.

Description

Add useful infrastructure to a package.

Usage

use_testthat(pkg = ".")

use_test(name, pkg = ".")

use_rstudio(pkg = ".")

use_vignette(name, pkg = ".")

use_rcpp(pkg = ".")

use_travis(pkg = ".")

use_coverage(pkg = ".", type = c("codecov", "coveralls"))

use_appveyor(pkg = ".")

use_package_doc(pkg = ".")

use_revdep(pkg = ".")

use_cran_comments(pkg = ".")

use_code_of_conduct(pkg = ".")

use_cran_badge(pkg = ".")

use_mit_license(pkg = ".", copyright_holder = getOption("devtools.name", ""))

Arguments

pkg
package description, can be path or package name. See as.package for more information.
name
File name to use for new vignette. Should consist only of numbers, letters, _ and -. I recommend using lower case.
type
CI tool to use. Currently supports codecov and coverall.
copyright_holder
The copyright holder for this package. Defaults to getOption("devtools.name").

<code>use_testthat</code>

Add testing infrastructure to a package that does not already have it. This will create tests/testthat.R, tests/testthat/ and add testthat to the suggested packages. This is called automatically from test if needed.

<code>use_test</code>

Add a test file, also add testing infrastructure if necessary. This will create tests/testthat/test-.R with a user-specified name for the test. Will fail if the file exists.

<code>use_vignette</code>

Adds needed packages to DESCRIPTION, and creates draft vignette in vignettes/. It adds inst/doc to .gitignore so you don't accidentally check in the built vignettes.

<code>use_rcpp</code>

Creates src/ and adds needed packages to DESCRIPTION.

<code>use_travis</code>

Add basic travis template to a package. Also adds .travis.yml to .Rbuildignore so it isn't included in the built package.

<code>use_coverage</code>

Add test code coverage to basic travis template to a package.

<code>use_appveyor</code>

Add basic AppVeyor template to a package. Also adds appveyor.yml to .Rbuildignore so it isn't included in the built package.

<code>use_package_doc</code>

Adds a roxygen template for package documentation

<code>use_revdep</code>

Add revdep directory and basic check template.

<code>use_cran_comments</code>

Add cran-comments.md template.

<code>use_code_of_conduct</code>

Add a code of conduct to from http://contributor-covenant.org.

<code>use_cran_badge</code>

Add a badge to show CRAN status and version number on the README

<code>use_mit_license</code>

Adds the necessary infrastructure to declare your package as distributed under the MIT license.

See Also

Other infrastructure: use_build_ignore, use_data_raw, use_data, use_news_md, use_package, use_readme_rmd