Re: [R] how to check if a library is loaded, from a function

2011-01-31 Thread Prof Brian Ripley
On Mon, 31 Jan 2011, Nick Matzke wrote: Hi, I've written a function which I load with a source command. The function requires a certain library, phangorn, to work. Do you mean an R package or an OS library (aka DLL)? I'll assume the former, but please do use accurate terminology. I woul

Re: [R] how to check if a library is loaded, from a function

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 11:04 PM, Nick Matzke wrote: 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 putti

[R] how to check if a library is loaded, from a function

2011-01-31 Thread Nick Matzke
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'