package_template: roxygen2 Oriented Package Skeleton

Description Usage Arguments Value References See Also Examples

View source: R/package_template.R

Description

Produce a package skeleton with basic roxygen2 markup.

Usage

1
2
package_template(..., name = "anRpackage", environment = .GlobalEnv,
  path = ".", list = NULL, open = TRUE, rproj = open)

Arguments

name

Character string: the package name and directory name for your package.

environment

An environment where objects are looked for.

path

Path to put the package directory in. Defaults to the working directory.

list

character vector naming the R objects to put in the package.

open

logical. If TRUE the project will be opened in RStudio.

rproj

logical. If TRUE a .rproj file for RStudio is generated.

...

Functions and data sets to be included in the project. A character of functions located in the environment argument can be included with the list argument instead.

Value

Generates a roxygen2 oriented package skeleton template.

References

Read the 'Writing R Extensions' manual for more details.

See Also

package.skeleton

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
## Example 1 (global env.)
package_template(mean, mtcars, CO2, lm)

## Example 2 (user env.)
guy <- new.env(FALSE)
guy$stuff <- mean
guy$lib <- library
guy$stole_this_data <- mtcars
ls(guy)

package_template(stuff, lib, stole_this_data, environment = guy)

## End(Not run)

trinker/acc.roxygen2 documentation built on May 27, 2017, 1:45 p.m.