pkgs_attached <- function() {
gsub("package:", "", grep("package:", search(), value = TRUE))
}
pkg_env <- function(x) {
as.environment(paste0("package:", x))
}
pkg_ls <- function(x) {
ls(envir = pkg_env(x))
}
pkg_get <- function(pkg, name) {
get(name, envir = pkg_env(pkg))
}
pkg_funs <- function(x) {
env <- pkg_env(x)
objs <- mget(ls(envir = env), envir = env, inherits = FALSE)
Filter(function(x) is_function(x) && !is_primitive(x), objs)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.