use_package_doc: Package-level documentation

View source: R/documentation.R

use_package_docR Documentation

Package-level documentation

Description

Adds a dummy .R file that will prompt roxygen to generate basic package-level documentation. If your package is named "foo", this will make help available to the user via ?foo or package?foo. Once you call devtools::document(), roxygen will flesh out the .Rd file using data from the DESCRIPTION. That ensures you don't need to repeat the same information in multiple places. This .R file is also a good place for roxygen directives that apply to the whole package (vs. a specific function), such as global namespace tags like ⁠@importFrom⁠.

Usage

use_package_doc(open = rlang::is_interactive())

Arguments

open

Open the newly created file for editing? Happens in RStudio, if applicable, or via utils::file.edit() otherwise.

See Also

The documentation chapter of R Packages


usethis documentation built on July 9, 2023, 7:23 p.m.