View source: R/functions_bfcif.R
digest_args | R Documentation |
returns digest::digest results of named list of arguments to calling function
digest_args(env = parent.frame(), to_ignore = character(), ...)
env |
Environment to collect variable from. By default this is the calling environment, i.e. the function containing a call to get_args. This may also be a function that returns an environment. |
to_ignore |
character names of variables to ignore. |
... |
Additional variables that should be considered as part of environment. |
A md5 digest of all variabes in calling environment. For a function is the same as calling arguments.
#The most common usage is to simply collect all local variables in a function
test_fun = function(x = 1, y = 2){
digest_args()
}
test_fun()
#Specified variables may be ignored
test_fun2 = function(x = 1, y = 2){
digest_args(to_ignore = "x")
}
test_fun2()
#Additional variables can also be added from higher environments
global_z = 3
test_fun3 = function(x = 1, y = 2){
digest_args(env = parent.frame, to_ignore = character(), z = global_z)
}
test_fun3()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.