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

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

[复制链接]
发表于 2012-9-30 01:34:35 | 显示全部楼层 |阅读模式
tuple(sets)
tuple()所属R语言包:sets

                                        Tuples
                                         元组

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

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

Creation and manipulation of tuples.
创建和操作的元组。


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


tuple(...)
as.tuple(x)
is.tuple(x)
singleton(...)
pair(...)
triple(...)
tuple_is_singleton(x)
tuple_is_pair(x)
tuple_is_triple(x)
tuple_is_ntuple(x, n)



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

参数:x
An R object.
R对象。


参数:n
A non-negative integer.
一个非负的整数。


参数:...
Possibly named R objects (for singleton, pair, and triple exactly one, two, and three, respectively.)
可能命名的R对象(singleton,pair,triple一个,两个和三个,分别)


Details

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

These functions represent basic infrastructure for handling tuples of general (R) objects.  Class tuple is used in particular to correctly handle cartesian products of sets.  Although tuple objects should behave like “ordinary” vectors, some operations might yield unexpected results since tuple objects are in fact list objects internally. The Summary methods do work if defined for the set elements. The mean and median methods try to convert the object to a numeric vector before calling the default methods.
这些功能一般(R)对象的元组处理的基础设施。类tuple特别是要正确处理好笛卡尔积集。虽然元组对象的行为应该像“普通”的向量,某些操作可能会产生意外的结果,因为元组对象其实内部列表对象。 Summary的方法做的工作,如果定义的集合元素。 mean和median方法试图将对象转换为一个数值向量,然后再调用默认的方法。


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

set.
set。


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


## Constructor.[#构造函数。]
tuple(1,2,3, TRUE)
triple(1,2,3)
pair(Name = "David", Height = 185)
tuple_is_triple(triple(1,2,3))
tuple_is_ntuple(tuple(1,2,3,4), 4)

## Converter.[#转换器。]
as.tuple(1:3)

## Operations.[#操作。]
c(tuple("a","b"), 1)
tuple(1,2,3) * tuple(2,3,4)
rep(tuple(1,2,3), 2)
min(tuple(1,2,3))
sum(tuple(1,2,3))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-21 03:29 , Processed in 0.019928 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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