11.2 NAMESPACE Workflow

The NAMESPACE file

  • keeps track of how and when to import functions from another package and export function from your package
  • generated from comments in R/*.R files
  • starts with comment explaining roxygen2 generation
  • needs to be regenerated periodically

11.2.1 General Workflow

  1. Add namespace-related tags to roxygen comments in R/*.R files.
  2. Run devtools::document() which updates help topics and regenerates NAMESPACE