ctv-client | R Documentation |
Client-side tools for installing CRAN task views.
ctv(view, repos = NULL, ...)
available.views(repos = NULL, ...)
install.views(views, coreOnly = FALSE, repos = NULL, ...)
update.views(views, coreOnly = FALSE, repos = NULL, lib.loc = NULL, filters = NULL, ...)
download.views(views, destdir, coreOnly = FALSE, repos = NULL, ...)
## S3 method for class 'ctv'
print(x, packagelist = TRUE, ...)
## S3 method for class 'ctvlist'
print(x, packagelist = FALSE, ...)
view, views |
character vector with the short names of the task views whose
associated packages should be downloaded and installed. Alternatively,
|
coreOnly |
logical. Should all packages or only core packages be installed?
(recycled to the same length as |
repos |
character, the base URL of the repository. By default |
lib.loc |
character vector describing the location of R library trees to search through (and update packages therein). |
filters |
a character vector or list to filter
|
destdir |
directory where downloaded packages are to be stored. |
... |
further arguments passed to |
x |
an object of class |
packagelist |
logical. Should the packagelist also be printed? |
install.views
queries the file ‘Views.rds’ located at
the ‘src/contrib’ directory of ‘repos’ and then simply calls
install.packages
to install the packages associated with the
view specified. For each view it can be specified whether all packages or
only the core packages should be installed.
available.views
returns the list of task views currently
available in the file ‘Views.rds’. In earlier versions, this was called
CRAN.views
(which still works and provides the same functionality).
update.views
queries which packages from a view are not yet
installed (using installed.packages
) and which of the installed
packages are older than the packages available (using available.packages
).
It subsequently installs only the packages that are not current or not
installed yet.
download.views
works exactly as install.views
except that it calls
download.packages
instead of install.packages
.
For a more detailed description of the arguments see also install.packages
.
available.views
returns an object of class "ctvlist"
of the
available task views whose elements are of class "ctv"
.
install.views
and update.views
have no return value.
install.packages
## Not run:
## query only a single view (with known name)
ctv("Econometrics")
## extract corresponding citation
ctv("Econometrics")$citation
## query list of CRAN task views available
available.views()
## install Econometrics view
install.views("Econometrics")
## only with core packages
install.views("Econometrics", coreOnly = TRUE)
## update Econometrics view (i.e. only packages that are not current anyway)
update.views("Econometrics")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.