The specified library is loaded mutedly by suppressing all messages. If the
library is not found, or its version under the specification of
minVer
, the R session dies with a message.
libordie(package, minVer, missing.quit.status = 1, ver.quit.status = 1)
One package name (can be character or non-quoted symbol (see examples)
Optional, character string, the minimum working version
Integer, the status of quitting when the package was not found
Integer, the status of quitting when the package was found, but older than the minimum working version
NULL
if success, otherwise the session will be killed.
Only one package should be tested once.
The function calls qqmsg
internally to kill the
session
if(interactive()) {
libordie(stats)
libordie("methods")
libordie(base, minVer="2.15-1")
}