
TRUE
only if all packages are loaded successfully. If
at least one loading fails, a short message is printed.r(...)
TRUE
if all packages are loaded correctly, FALSE
otherwise. This
function is designed to concisely and quitely indicate package requirements in
GUI menu or other GUI actions.require
# This should work...
if (r("tools", "methods")) cat("Fine!
")
# ... but this not (notice there is no error or warning!)
if (r("tools", "badname")) cat("Fine!
")
Run the code above in your browser using DataLab