infrastructure

0th

Percentile

Add useful infrastructure to a package.

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 = ".", browse = interactive())

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", ""))

use_gpl3_license(pkg = ".")

use_dev_version(pkg = ".")

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.

browse

open a browser window to enable Travis builds for the package automatically.

type

CI tool to use. Currently supports codecov and coverall.

copyright_holder

The copyright holder for this package. Defaults to getOption("devtools.name").

use_testthat

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.

use_test

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

use_vignette

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.

use_rcpp

Creates src/ and adds needed packages to DESCRIPTION.

use_travis

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

use_coverage

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

use_appveyor

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

use_package_doc

Adds a roxygen template for package documentation

use_revdep

Add revdep directory and basic check template.

use_cran_comments

Add cran-comments.md template.

use_code_of_conduct

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

use_cran_badge

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

use_mit_license

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

use_gpl3_license

Adds the necessary infrastructure to declare your package as distributed under the GPL v3.

use_dev_version

This adds ".9000" to the package DESCRIPTION, adds a new heading to NEWS.md (if it exists), and then checks the result into git.

See Also

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

Aliases
  • infrastructure
  • use_testthat
  • use_test
  • use_rstudio
  • use_vignette
  • use_rcpp
  • use_travis
  • add_travis
  • use_coverage
  • use_appveyor
  • use_package_doc
  • use_revdep
  • add_travis
  • use_cran_comments
  • add_travis
  • use_code_of_conduct
  • add_travis
  • use_cran_badge
  • use_mit_license
  • use_gpl3_license
  • use_dev_version
Documentation reproduced from package devtools, version 1.13.5, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.