R/isAttached.R

Defines functions isAttached

Documented in isAttached

#' Is a package attached?
#' 
#' @param pkg Either character or unquoted. 
#' @return \code{TRUE} if \code{pkg} is attached.
#' @export

isAttached <- function(pkg) {
  .pkg <- as.character(substitute(pkg))
  .pkg %in% .packages()
}

Try the hutils package in your browser

Any scripts or data that you put into this service are public.

hutils documentation built on April 13, 2022, 5:23 p.m.