Description Usage Arguments Value References See Also Examples
Add a ‘.rda’ file to the ‘data’ directory of a package and document
roxygen2 style in the
‘R/____package.R’ file.
1 2 |
data |
A data set ( |
data.path |
The path to the data directory (where the data will be placed). Defaults to ‘data’. |
stand.alone |
logical. If |
doc.path |
The path to the package documentation ‘.R’ file. Use
|
Generates a ‘____.rda’ file and accompanying roxygen2 style documentation.
http://r-pkgs.had.co.nz/data.html#documenting-data
Other new functions: new_r_test
,
new_r
, new_test
,
new_vignette
1 2 3 4 5 6 7 8 9 10 | ## Not run:
pax("temp_dir", open = FALSE)
dir.create("temp_dir/data")
## Note: If used in RStudio with the root directory set to the
## package the user does not need to supply `data.path` or `doc.path`
new_data(mtcars, data.path = "temp_dir/data",
doc.path = "temp_dir/R/temp_dir-package.R")
unlink("temp_dir", TRUE, TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.