makeOxygen: Populate Roxygen2 Skeleton

View source: R/makeOxygen.R

makeOxygenR Documentation

Populate Roxygen2 Skeleton

Description

Creates roxygen2 skeleton including title, description, import and other fields for an object in the global environment or a function of an attached namespace.

Usage

makeOxygen(
  obj,
  add_default = TRUE,
  add_fields = sinew_opts$get("add_fields"),
  use_dictionary = NULL,
  print = TRUE,
  ...
)

Arguments

obj

function or name of function

add_default

boolean to add defaults values to the end of the PARAM fields, Default: TRUE

add_fields

character vector to add additional roxygen2 fields, Default: c("details","examples","seealso","rdname","export")

use_dictionary

character, path_to_dictionary, Default: NULL

print

boolean print output to console, Default: TRUE

...

arguments to be passed to make_import

Details

add_fields can include any slot except for the defaults (title,description,param,return). The order in add_fields determines the order of printout. The roxygen2 fields to add are list below, for more information go to Generating Rd files. If obj is 'data.frame' or 'tibble' then the fields c('export','examples','seealso','rdname') will be ignored.

Field Skeleton
author AUTHOR [AUTHOR_2]
backref src/filename.cpp
concept CONCEPT_TERM_1 [CONCEPT_TERM_2]
describeIn FUNCTION_NAME DESCRIPTION
details DETAILS
example path/relative/to/packge/root
export
family FAMILY_TITLE
field FIELD_IN_S4_RefClass DESCRIPTION
format DATA_STRUCTURE
importClassesFrom PKG CLASS_a [CLASS_b]
importMethodsFrom PKG METHOD_a [METHOD_b]
include FILENAME.R [FILENAME_b.R]
inherit [PKG::]SOURCE_FUNCTION [FIELD_a FIELD_b]
inheritDotParams [PKG::]SOURCE_FUNCTION
inheritSection [PKG::]SOURCE_FUNCTION [SECTION_a SECTION_b]
keywords KEYWORD_TERM
name NAME
rdname FUNCTION_NAME
references BIB_CITATION
section SECTION_NAME
source \url{http://somewhere.important.com/}
slot SLOTNAME DESCRIPTION
template FILENAME
templateVar NAME VALUE
useDynLib PKG [routine_a routine_b]

Examples

makeOxygen(stats::lm)

sinew documentation built on March 31, 2022, 5:06 p.m.