exists_in_namespace | R Documentation |
Determines whether or not an object exists in a specific namespace.
exists_in_namespace(x, ns, pos = -1L, envir = as.environment(pos))
x |
an object name (given as a character string). |
ns |
a namespace, or character string giving the namespace. |
pos |
where to look for the object: see |
envir |
an alternative way to specify an environment to look in. |
This complements utils::getFromNamespace()
and uses almost the same code internally.
A logical scalar.
if (pal::is_pkg_installed("pkgpurl")) {
pal::exists_in_namespace("pkg_config", "pkgpurl")
}
pal::exists_in_namespace("pkg_config", "pal")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.