describe: Create dataset descriptions for roxygen. The workhorse.

Description Usage Arguments Value Examples

View source: R/describe.R

Description

Create dataset descriptions for roxygen. The workhorse.

Usage

1
2
3
4
describe(data, text, file, outfile, fileEncoding = "", envir = NULL,
  encoding = "unknown", comment.char = "##'", start = "\\itemize{",
  end = "}", item = "\\item %s:", indent = 3, sublist = NULL,
  add_tables = NULL, ...)

Arguments

data

Input data

text

Optional text describing dataset (to go in description area).

file

Optional location of file with description of data

outfile

Optional location of file to write output

fileEncoding

File encoding

envir

Environment to find data

encoding

encoding

comment.char

prefix character for roxygen template (default )

start

Start of itemized list (default "\\itemize {")

end

End of itemized list (default "}")

item

Format for an item in list as regex to pass to sprintf.

indent

How many spaces to indent itemized lists (default: 3)

sublist

Optional list of columns (factors/characters) that should be sublisted.

add_tables

List of columns to add tabular counts in description (or TRUE for all).

...

further arguments passed to roxy_format

Value

Vector of lines for roxygen metadata, or write to file if outfile.

Examples

1
2
3
4
5
## run devtools::document() afterward for example
## Not run: 
  roxy_itemize(mtcars, text='Dataset about cars', outfile='temp.R', add_tables=TRUE)

## End(Not run)

nverno/datadoc documentation built on May 24, 2019, 10:53 a.m.