update.packages(utils)
update.packages()所属R语言包:utils
Compare Installed Packages with CRAN-like Repositories
比较CRAN的像仓库安装的软件包
译者:生物统计家园网 机器人LoveR
描述----------Description----------
old.packages indicates packages which have a (suitable) later version on the repositories whereas update.packages offers to download and install such packages.
old.packages表示有更高版本(适合),而库的包update.packages提供下载并安装这些软件包。
new.packages looks for (suitable) packages on the repositories that are not already installed, and optionally offers them for installation.
new.packages寻找(合适)上尚未安装的库包,并有选择地提供安装。
用法----------Usage----------
update.packages(lib.loc = NULL, repos = getOption("repos"),
contriburl = contrib.url(repos, type),
method, instlib = NULL,
ask = TRUE, available = NULL,
oldPkgs = NULL, ..., checkBuilt = FALSE,
type = getOption("pkgType"))
old.packages(lib.loc = NULL, repos = getOption("repos"),
contriburl = contrib.url(repos, type),
instPkgs = installed.packages(lib.loc = lib.loc),
method, available = NULL, checkBuilt = FALSE,
type = getOption("pkgType"))
new.packages(lib.loc = NULL, repos = getOption("repos"),
contriburl = contrib.url(repos, type),
instPkgs = installed.packages(lib.loc = lib.loc),
method, available = NULL, ask = FALSE, ...,
type = getOption("pkgType"))
参数----------Arguments----------
参数:lib.loc
character vector describing the location of R library trees to search through (and update packages therein), or NULL for all known trees (see .libPaths).
特征向量描述的R库树的位置,通过搜索(更新包内),或NULL所有已知的树木(见.libPaths)。
参数:repos
character vector, the base URL(s) of the repositories to use, i.e., the URL of the CRAN master such as "http://cran.r-project.org" or its Statlib mirror, "http://lib.stat.cmu.edu/R/CRAN". Can be NULL to install from local files (".tar.gz" for source packages).
特征向量,基本URL(S)的仓库使用,即CRAN的大师,如"http://cran.r-project.org"或者其Statlib的镜子,"http://lib.stat.cmu.edu/R/CRAN"的URL。可以NULL从本地文件(.tar.gz源代码包),安装。
参数:contriburl
URL(s) of the contrib sections of the repositories. Use this argument only if your repository mirror is incomplete, e.g., because you burned only the "contrib" section on a CD. Overrides argument repos. As with repos, can also be NULL to install from local files.
URL(S)仓库的contrib部分。使用此参数,只有当你的资料库镜像是不完整的,例如,因为你烧在CD上只有contrib节。覆盖参数repos。至于repos,也可以是NULL从本地文件安装。
参数:method
Download method, see download.file.
下载方法,请参阅download.file。
参数:instlib
character string giving the library directory where to install the packages.
字符串库目录在哪里安装软件包。
参数:ask
logical indicating whether to ask user before packages are actually downloaded and installed, or the character string "graphics", which brings up a widget to allow the user to (de-)select from the list of packages which could be updated or added. The latter value only works on systems with a GUI version of select.list, and is otherwise equivalent to ask = TRUE.
逻辑说明是否要求前包的用户实际上是下载并安装,或字符串"graphics"的,这带来了一个widget,让用户()从包可以更新或添加列表中选择。系统上,只有后者的价值工程与GUI版本的select.list,否则相当于ask = TRUE。
参数:available
an object as returned by available.packages listing packages available at the repositories, or NULL which makes an internal call to available.packages.
一个对象作为返回available.packages上市软件包仓库,或NULL这使得available.packages内部通话。
参数:checkBuilt
If TRUE, a package built under an earlier minor version of R is considered to be "old".
如果TRUE,建立了一个包下R的一个较早的次要版本被认为是老。
参数:oldPkgs
if specified as non-NULL, update.packages() only considers these packages for updating. This may be a character vector of package names or a matrix as returned by old.packages().
如果指定非NULL,update.packages()只考虑这些软件包的更新。这可能是一个包名称或old.packages()返回矩阵的特征向量。
参数:instPkgs
by default all installed packages, installed.packages(lib.loc=lib.loc). A subset can be specified; currently this must be in the same (character matrix) format as returned by installed.packages().
默认情况下,所有已安装的软件包,installed.packages(lib.loc=lib.loc)。可以指定一个子集,目前,这必须是在同一格式(字符点阵)installed.packages()返回。
参数:...
Arguments such as destdir and dependencies to be passed to install.packages.
参数,如destdir和dependencies传递install.packages的。
参数:type
character, indicating the type of package to download and install. See install.packages.
字符,表明包的类型,下载并安装。看到install.packages。
Details
详情----------Details----------
old.packages compares the information from available.packages with that from instPkgs (computed by installed.packages by default) and reports installed packages that have newer versions on the repositories or, if checkBuilt = TRUE, that were built under an earlier minor version of R (for example built under 2.8.x when running R 2.9.0). (For binary package types here is no check that the version on the repository was built under the current minor version of R, but it is advertised as being suitable for this version.)
old.packages比较信息从available.packages从instPkgs(installed.packages计算默认情况下),并报告安装包有对库的新版本,如果<X >,建下R的一个较早的次要版本(例如当运行ŕ2.9.0 2.8.x下建立)。 (这里是二进制包类型没有建库的版本,根据目前的次要版本的R支票,但它是作为适合这个版本的广告。)
new.packages does the same comparison but reports uninstalled packages that are available at the repositories. If ask != FALSE it asks which packages should be installed in the first element of lib.loc.
new.packages不相同的比较,但报告在库提供的卸载包。如果ask != FALSE它要求包应安装在lib.loc的第一个元素。
The main function of the set is update.packages. First a list of all packages found in lib.loc is created and compared with those available at the repositories. If ask = TRUE (the default) packages with a newer version are reported and for each one the user can specify if it should be updated. If so the packages are downloaded from the repositories and installed in the respective library path (or instlib if specified).
该组的主要功能是update.packages。首先发现在lib.loc所有包的列表创建与那些在仓库。如果ask = TRUE(默认)用较新版本的软件包报告,并为每一个用户可以指定是否应更新。如果是这样的包从资料库下载并安装在各自的库路径(或instlib如果指定)。
For how the list of suitable available packages is determined see available.packages. available = NULL make a call to available.packages(contriburl = contriburl, method = method) and hence by default filters on R version, OS type and removes duplicates.
对于如何确定合适的可用的软件包列表见available.packages。 available = NULL拨打电话available.packages(contriburl = contriburl, method = method)“,因此R版本,OS类型上的默认的过滤器,并删除重复。
值----------Value----------
update.packages returns NULL invisibly.
update.packages返回NULL无形。
For old.packages, NULL or a matrix with one row per package, row names the package names and column names "Package", "LibPath", "Installed" (the version), "Built" (the version built under), "ReposVer" and "Repository".
old.packages,NULL或与一排每包矩阵,行名,包名和列名"Package","LibPath","Installed"(版本) ,"Built"(下建成的版本),"ReposVer"和"Repository"。
For new.packages a character vector of package names, after any selected via ask have been installed.
new.packages特征向量后,通过ask选择任何一个包名,已安装。
警告----------Warning----------
Take care when using dependencies (passed to install.packages) with update.packages, for it is unclear where new dependencies should be installed. The current implementation will only allow it if all the packages to be updated are in a single library, when that library will be used.
小心使用dependencies(传递给install.packages)update.packages,它是不明的,应安装在新的依赖。如果要更新所有包在一个单一的库,该库将用于目前的执引号况,将只允许它。
参见----------See Also----------
install.packages, available.packages, download.packages, installed.packages, contrib.url.
install.packages,available.packages,download.packages,installed.packages,contrib.url。
See download.file for how to handle proxies and other options to monitor file transfers.
看到download.file如何处理代理和其他选项来监视文件传输。
INSTALL, REMOVE, remove.packages, library, .packages, read.dcf
INSTALL,REMOVE,remove.packages,library,.packages,read.dcf
The "R Installation and Administration" manual for how to set up a repository.
“R安装和管理的手册为如何建立一个仓库。
举例----------Examples----------
## Not run: [#无法运行:]
install.packages(
c("XML_0.99-5.tar.gz",
"../../Interfaces/Perl/RSPerl_0.8-0.tar.gz"),
repos = NULL,
configure.args = c(XML = '--with-xml-config=xml-config',
RSPerl = "--with-modules='IO Fcntl'"))
## End(Not run)[#结束(不运行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|