Description Usage Arguments Value References See Also Examples
Produce a package skeleton with basic roxygen2 markup.
1 2 | package_template(..., name = "anRpackage", environment = .GlobalEnv,
path = ".", list = NULL, open = TRUE, rproj = open)
|
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 |
rproj |
logical. If |
... |
Functions and data sets to be included in the project. A
character of functions located in the |
Generates a roxygen2 oriented package skeleton template.
Read the 'Writing R Extensions' manual for more details.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.