View source: R/init_function.R
init_function | R Documentation |
Create initial script and test files for a function that is to be added to a package.
init_function(name, dir = ".", overwrite = FALSE)
name |
Name of the function. Should start with the function's category, followed by a specific name,
separated by an underscore ( |
dir |
Path to the package's development directory; default is the current working directory. |
overwrite |
Logical; if |
Creates files in dir/R
and dir/tests/testthat
, attempts to navigate to the code file,
and returns a character vector to their paths.
## Not run:
# creates a skeleton for a `measure_new` function
init_function("measure_new")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.