Creates roxygen2 skeleton including title, description, import and other fields for an object in the global environment or a function of an attached namespace.
makeOxygen(
obj,
title = NULL,
description = NULL,
add_default = TRUE,
add_fields = sinew_opts$get("add_fields"),
use_dictionary = NULL,
use_labels = FALSE,
markdown = FALSE,
scope = c("full", "simple", "unlink", "indent", "none"),
print = TRUE,
copy = interactive(),
...
)
make_oxygen(
obj,
title = NULL,
description = NULL,
add_default = TRUE,
add_fields = sinew_opts$get("add_fields"),
use_dictionary = NULL,
use_labels = FALSE,
markdown = FALSE,
scope = c("full", "simple", "unlink", "indent", "none"),
print = TRUE,
copy = interactive(),
...
)
function or name of function, a data frame, or a vector (strings are interpreted as function names).
Optional title and description values to use
boolean to add defaults values to the end of the PARAM fields, Default: TRUE
character vector to add additional roxygen2 fields, Default: c("details","examples","seealso","rdname","export")
character, path_to_dictionary, Default: NULL
boolean to use label attribute of data frame columns to fill column description values. Ignored if obj is a function or vector. Default: FALSE.
boolean to return roxygen2 skeleton with Markdown formatting, Default: FALSE
The scope of transformations: "simple"
runs only transformations
that shouldn't substantially change the resulting .Rd
files, "full"
runs
all transformations. In larger packages, run "none"
, double-check and track
the changes, and then run "simple"
and then "full"
.
boolean print output to console, Default: TRUE
boolean copy output to clipboard, Default: interactive()
arguments to be passed to make_import
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] |
makeOxygen(stats::lm)
#> #' @title FUNCTION_TITLE
#> #' @description FUNCTION_DESCRIPTION
#> #' @param formula PARAM_DESCRIPTION
#> #' @param data PARAM_DESCRIPTION
#> #' @param subset PARAM_DESCRIPTION
#> #' @param weights PARAM_DESCRIPTION
#> #' @param na.action PARAM_DESCRIPTION
#> #' @param method PARAM_DESCRIPTION, Default: 'qr'
#> #' @param model PARAM_DESCRIPTION, Default: TRUE
#> #' @param x PARAM_DESCRIPTION, Default: FALSE
#> #' @param y PARAM_DESCRIPTION, Default: FALSE
#> #' @param qr PARAM_DESCRIPTION, Default: TRUE
#> #' @param singular.ok PARAM_DESCRIPTION, Default: TRUE
#> #' @param contrasts PARAM_DESCRIPTION, Default: NULL
#> #' @param offset PARAM_DESCRIPTION
#> #' @param ... PARAM_DESCRIPTION
#> #' @returns OUTPUT_DESCRIPTION
#> #' @details DETAILS
#> #' @examples
#> #' \dontrun{
#> #' if(interactive()){
#> #' #EXAMPLE1
#> #' }
#> #' }
#> #' @seealso
#> #' \code{\link[stats]{model.frame}}
#> #' @rdname stats::lm
#> #' @export
#> #' @importFrom stats model.frame