fm_call_ns_name | R Documentation |
Tries to detect the namespace of a call automatically. It will first try
to extract the namespace using rlang::call_ns()
; if this fails, it will
use the supplied env
(rlang::caller_env()
, by default) to attempt to
extract the namespace from the call's function. The latter method is similar
to rlang::call_fn()
, which is now deprecated due to inconsistent results.
It is not yet clear whether this works well enough to retain the behavior in
practice.
fm_call_ns_name(call, env = rlang::caller_env(), error = TRUE)
call |
A |
env |
The environment to use to lookup the function definition from
|
error |
Should the function throw an error if |
The name of the associated namespace, if detected; if not, returns
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.