funs4rox: roxygen2 Format Functions

Description Usage Arguments Value Examples

Description

funs4rox - This function generates basic roxygen framework for functions that can be set to print to your package's R directory.

meths4rox - This function generates basic roxygen framework for methods functions that can be set to print to your package's R directory.

Usage

1
2
3

Arguments

rdir

The location of the R directory to create the .R files. If NULL prints to the console.

funs

Alternate character string (in lieu of ...).

environment

The environment to evaluate the function in.

...

Functions (expressions) to create .R files for.

Value

Returns a basic .R files for a function with roxygen2 documentation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Create practice folders
library(reports)
folder("pack1/R"); folder("pack2/R")

## Expression functions
funs4rox(mean, pack_fun, lm, rdir="pack1/R")

## Character functions
funs <- c('mean', 'pack_fun', "lm")
funs4rox(funs = funs, rdir="pack2/R")

## Clean up
lapply(c("pack1", "pack2"), delete)

trinker/acc.roxygen2 documentation built on May 31, 2019, 8:41 p.m.