找回密码
 注册
查看: 1604|回复: 0

R语言:available.packages()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 21:34:57 | 显示全部楼层 |阅读模式
available.packages(utils)
available.packages()所属R语言包:utils

                                        List Available Packages at CRAN-like Repositories
                                         列出可用的软件包,在CRAN上,像仓库

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

available.packages returns a matrix of details corresponding to packages currently available at one or more repositories. The current list of packages is downloaded over the internet (or copied from a local mirror).
available.packages返回一个矩阵对应目前在一个或多个库包的细节。 (或从本地镜像复制)在互联网上下载的包的当前列表。


用法----------Usage----------


available.packages(contriburl = contrib.url(getOption("repos"), type),
                   method, fields = NULL,
                   type = getOption("pkgType"),
                   filters = NULL)



参数----------Arguments----------

参数:contriburl
URL(s) of the "contrib" sections of the repositories. Specify this argument only if your repository mirror is incomplete, e.g., because you burned only the "contrib" section on a CD.  
网址(S)的contrib仓库的部分。指定此参数,只有当你的资料库镜像是不完整的,例如,因为你烧只有contribCD上的一段。


参数:method
download method, see download.file.  
下载方法,请参阅download.file。


参数:type
character string, indicate which type of packages: see install.packages.  
字符串,表明包的类型:install.packages。


参数:fields
a character vector giving the fields to extract from the "PACKAGES" file(s) in addition to the default ones, or NULL (default).  Unavailable fields result in NA values.  
领域的一个字符向量提取从“PACKAGES文件(S)中除了默认的,或者NULL(默认)。 NA值不可用领域的结果。


参数:filters
a character vector or list or NULL (default). See "Details".  
一个字符向量或列表或NULL(默认)。见“详细资料”。


Details

详情----------Details----------

By default, this includes only packages whose version and OS requirements are met by the running version of R, and only gives information on the latest versions of packages.
默认情况下,唯一的软件包的版本和操作系统要求会见了由R的运行版本,并只给包的最新版本的信息。

Argument filters can be used to select which of the packages on the repositories are reported.  It is called with its default value (NULL) by functions such as install.packages: this value corresponds to getOption("available_packages_filters") and to c("R_version", "OS_type", "subarch", "duplicates") if that is unset or set to NULL.
参数filters可用于选择报告库包。它被称为功能,如它的默认值(NULL)install.packages:这个值对应到getOption("available_packages_filters")c("R_version", "OS_type", "subarch", "duplicates"),如果没有设置或设置为<X >

The built-in filters are
内置的过滤器




"R_version" exclude packages whose R version
"R_version"排除包的R版本




"OS_type" exclude packages whose OS requirement is incompatible with this version of R: that is exclude Windows-only packages on a Unix-alike platform
"OS_type"排除其操作系统的要求是不符合此版本的R包:即排除只包一样的Unix平台上的Windows




"subarch" for binary packages, exclude those with compiled code that is not available for the current sub-architecture, e.g. exclude packages only compiled for 32-bit
"subarch"二进制包,排除那些不为当前子结构与编译的代码,例如:排除包仅编译为32位




"duplicates" only report the latest version where more than one version is available, and only report the first-named repository (in contriburl) with the latest version if that
"duplicates"只报告多个版本可用的最新版本,并只报告与排名首位的最新版本的库(在contriburl)




"license/FOSS" include only packages for which installation can proceed solely based on packages which can be verified as Free or Open Source Software (FOSS, e.g., http://en.wikipedia.org/wiki/FOSS) employing the available license specifications.  Thus both the package and any packages that it depends on to load need to be known to be FOSS.
"license/FOSS"只包括为可以继续安装完全免费或开放源码软件(源码,例如,http://en.wikipedia.org/wiki/FOSS)用人可用的许可证,可作为验证的软件包为基础的软件包规范。因此被称为是源码包和任何软件包,它依赖于加载需要。

Note that this does depend on the repository supplying license information.
请注意,这取决于提供许可证信息库。

If all the filters are from this set they can be specified as a character vector; otherwise filters should be a list with elements which are character strings, user-defined functions or add = TRUE (see below).
如果所有的过滤器这一套,他们可以被指定作为一个特征向量;否则filters应该是一个字符串,用户定义的函数或add = TRUE(见下文)的元素的列表。

User-defined filters are functions which take a single argument, a matrix of the form returned by by available.packages, and return a matrix consisting of a subset of the rows of the argument.
用户定义的过滤器是一个参数的函数,矩阵的形式返回由available.packages,并返回一个子集参数行组成的一个矩阵。

The special "filter" add = TRUE appends the other elements of the filter list to the default filters.
特殊的过滤器add = TRUE追加默认的过滤器的过滤器列表的其他元素。


值----------Value----------

A matrix with one row per package, row names the package names and column names "Package", "Version", "Priority", "Depends", "Imports", "LinkingTo", "Suggests", "Enhances", "OS_type", "License", "File" and "Repository".  Additional columns can be specified using the fields argument.
矩阵与每一个行包,行名包名和列名"Package","Version","Priority","Depends","Imports","LinkingTo" ,"Suggests","Enhances","OS_type","License","File"和"Repository"。使用fields参数,可以指定额外的列。


参见----------See Also----------

install.packages, download.packages, contrib.url.
install.packages,download.packages,contrib.url。

The "R Installation and Administration" manual for how to  set up a repository.
“R安装和管理的手册为如何建立一个仓库。


举例----------Examples----------


## restrict install.packages() (etc) to known-to-be-FOSS packages[#的install.packages()(等)的限制,已知将要源码包]
options(available_packages_filters =
  c("R_version", "OS_type", "subarch", "duplicates", "license/FOSS"))



转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-23 17:33 , Processed in 0.020835 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表