| checkNameSpace | R Documentation |
Help you to check if you have certain packages and return missing package names
checkNameSpace(
packages,
quietly = FALSE,
from = "CRAN",
time_out = 1,
on_timeout = {
FALSE
}
)
packages |
vector of strings |
quietly |
bool, give you warning on fail? |
from |
string, where this package is from like, "CRAN", "GitHub", only for output message display purpose |
time_out |
numeric, how long to wait before reaching the time limit. Sometimes there are too many pkgs installed and takes too long to scan the whole list. Set this timeout in seconds to prevent the long waiting. |
on_timeout |
expressions, call back experssions to run when reaches timeout time. Default is return 'FALSE' as indicating that package is missing (we can't find the package). |
vector of strings, of missing package names, 'character(0)' if no missing
checkNameSpace("ggplot2")
checkNameSpace("random_pkg")
checkNameSpace("random_pkg", quietly = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.