checkNameSpace {spsUtil} | R Documentation |
check namespace
Description
Help you to check if you have certain packages and return missing package names
Usage
checkNameSpace(
packages,
quietly = FALSE,
from = "CRAN",
time_out = 1,
on_timeout = { FALSE }
)
Arguments
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 |
Value
vector of strings, of missing package names, character(0)
if no missing
Examples
checkNameSpace("ggplot2")
checkNameSpace("random_pkg")
checkNameSpace("random_pkg", quietly = TRUE)
[Package spsUtil version 0.2.2 Index]