Skip to content
Prev 249010 / 398528 Next

how to check if a library is loaded, from a function

Hi,

I've written a function which I load with a source command. 
  The function requires a certain library, phangorn, to work.

I would like the function to check if phangorn is loaded as 
a library before running.  For some reason, just putting 
require(phangorn) into the sourced function doesn't do anything.

This must be simple, but I can't figure it out!  Any help 
appreciated...

Cheers!
Nick