These are wrappers around available.packages and also get the archived versions available on CRAN.
archiveVersionsAvailable(package, repos) available.packagesCached( repos, purge, verbose = getOption("Require.verbose"), returnDataTable = TRUE, type )
A single package name (without version or github specifications)
The remote repository (e.g., a CRAN mirror), passed to either
Logical. Should all caches be purged? Default is
getOption("Require.purge", FALSE). There is a lot of internal caching of
results throughout the
Require package. These help with speed and reduce
calls to internet sources. However, sometimes these caches must be purged.
The cached values are renewed when found to be too old, with the age limit.
This maximum age can be set in seconds with the environment variable
R_AVAILABLE_PACKAGES_CACHE_CONTROL_MAX_AGE, or if unset, defaults to 3600
(one hour -- see
Internally, there are calls to
Numeric or logical indicating how verbose should the function
be. If -1 or -2, then as little verbosity as possible. If 0 or FALSE,
then minimal outputs; if
1 or TRUE, more outputs;
2 even more. NOTE: in
Require function, when
verbose >= 2, the return object will have an
attr(.., "Require") which has lots of information about the
processes of the installs.
TRUE, the default, then the return
is a data.table.
Otherwise, it is a
matrix, as per
archiveVersionsAvailable searches CRAN Archives for available versions.
It has been borrowed from a sub-set of the code in a non-exported function: