#' Detach Packages from Workspace
#'
#' This function allows for packages loaded into the workspace previously to be dettached, thus reducing the risk of functions being masked.
#' @param pkg The package name
#' @export
detach_package <- function(pkg, character.only = FALSE)
{
if(!character.only)
{
pkg <- deparse(substitute(pkg))
}
search_item <- paste("package", pkg, sep = ":")
while(search_item %in% search())
{
detach(search_item, unload = TRUE, character.only = TRUE)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.