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()
}
HughParsonage/hutils documentation built on Feb. 12, 2023, 8:26 a.m.