Description Usage Arguments Examples
This is a concrete example of how update_function_arguments()
can be
used to figure out where default arguments are being called from.
1 2 | set_sentinel_on_default_arg(function_name, argument_name,
package_name = NULL, envir = parent.frame())
|
function_name |
character name of function |
argument_name |
Name of default argument which should have sentinel |
package_name |
character name of package. Set this if you want the function to be updated within the package namespace. If this is unset then the changed function is placed in the specified environment |
envir |
environment to place the function if package_name not set |
1 2 3 4 5 6 | ## Not run:
# Get a sentinel warning everytime data.frame() is called without the user
# explicitly setting a 'stringsAsFactors' argument
set_sentinel_on_default_arg('data.frame', 'stringsAsFactors', package_name = 'base')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.