Skip to contents

Wrapper around usethis::use_package() with different defaults and optional DESCRIPTION file tidying.

Usage

use_pkg(package, type = "Imports", min_version = TRUE, tidy = TRUE)

Arguments

package

Name of package to depend on.

type

Type of dependency: must be one of "Imports", "Depends", "Suggests", "Enhances", or "LinkingTo" (or unique abbreviation). Matching is case insensitive.

min_version

Optionally, supply a minimum version for the package. Set to TRUE to use the currently installed version.

tidy

Whether or not to run usethis::use_tidy_description() after adding package to dependencies.

Value

NULL, invisibly.

See also

Other R package functions: assert_pkg(), is_pkg_cran(), is_pkg_dir(), is_pkg_installed(), is_pkgdown_dir(), ls_pkg()