Skip to content
Prev 77162 / 398502 Next

is library loaded

Dear Omar,

The following function tests whether a package is in the search path (with
the package name given in quotes):

packageLoaded <- function(name) 0 != length(grep(paste("^package:", name,
"$", sep=""), search()))

I hope this helps,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
--------------------------------