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

R语言 TRAMPR包 TRAMPindexing()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 11:44:26 | 显示全部楼层 |阅读模式
TRAMPindexing(TRAMPR)
TRAMPindexing()所属R语言包:TRAMPR

                                        Index (Subset) TRAMPsamples and TRAMPknowns Objects
                                         指数(子集)TRAMPsamples的“和TRAMPknowns对象

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

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

This provides very basic support for subsetting TRAMPsamples and TRAMPknowns objects.
这提供了非常基本的支持子集TRAMPsamples和TRAMPknowns对象。


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


## S3 method for class 'TRAMPknowns'
x[i, na.interp=TRUE, ...]
## S3 method for class 'TRAMPsamples'
x[i, na.interp=TRUE, ...]



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

参数:x
A TRAMPsamples or TRAMPknowns object.
ATRAMPsamples或TRAMPknowns对象。


参数:i
A vector of sample.fk or knowns.fk values.  For valid values, use labels(x).  If any index values are not present in x, then an error will be raised.  Alternatively, this may be a logical vector, of the same length as the number of samples or knowns in x.  See Examples for use of this.  
sample.fk或knowns.fk值的矢量。有效的值,使用labels(x)。在x如果任何索引值不存在,那么将会引发错误。可替换地,这可能是一个逻辑向量,样品或已知x的数量相同的长度。请参阅用于此的例子。


参数:na.interp
Logical: Controls how NA values should be interpreted when i is a logical vector.
逻辑:控制NA值应解释时i是一个逻辑向量。


参数:...
Further arguments passed to or from other methods.
进一步的参数传递给其他方法。


Details

详细信息----------Details----------

When indexing by logical vectors, NA values do not make valid indexes, but may be produced when testing columns that contain missing values, so these must be converted to either TRUE or FALSE. If i is a logical index that contains missing values (NAs), then na.interp controls how they will be interpreted:
当索引的逻辑向量,NA值不进行有效的指标,但在测试时,可能会产生列包含缺失值,因此必须将其转换是TRUE或FALSE。如果i是一个逻辑指数包含遗漏值(NAS),然后na.interp控制它们将被解释:

If na.interp=TRUE, then TRUE, FALSE, NA becomes TRUE, FALSE, TRUE.
如果na.interp=TRUE,那么TRUE, FALSE, NATRUE, FALSE, TRUE。

If na.interp=FALSE, then TRUE, FALSE, NA becomes TRUE, FALSE, FALSE.
如果na.interp=FALSE,那么TRUE, FALSE, NATRUE, FALSE, FALSE。


警告----------Warning----------

For TRAMPknowns objects, if the file.pat element is specified as part of the object (see TRAMPknowns), then the subsetted TRAMPknowns object will be written to a file. This may not be what you want, so it is probably best to disable knowns writing by doing x$file.pat <- NULL before doing any subsetting (where x is the name of your TRAMPknowns object).
TRAMPknowns对象,如果file.pat元素被指定为对象的一部分(见TRAMPknowns),然后在子集TRAMPknowns对象将被写入到一个文件中。这可能不是你想要的,所以它可能是最好禁用已知书面做x$file.pat <- NULL在做任何子集(x是TRAMPknowns对象的名称)。


实例----------Examples----------


data(demo.samples)
data(demo.knowns)

## Subsetting by sample.fk values[#由sample.fk值子集]
labels(demo.samples)
demo.samples[c(101, 102, 110)]
labels(demo.samples[c(101, 102, 110)])

## Take just samples from the first 10 soilcores:[#举只是样品从第10 soilcores,:]
demo.samples[demo.samples$info$soilcore.fk <= 10]

## Indexing also works on TRAMPknowns:[#索引也上TRAMPknowns工作:]
demo.knowns[733]
labels(demo.knowns[733])

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-16 21:39 , Processed in 0.021286 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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