设为首页收藏本站获取积分奖励

R语言中文网

 找回密码
 立即注册
查看: 500|回复: 0

R语言角色对象duplicated-method()函数-中英文对照帮助文档

[复制链接]
发表于 2021-2-14 13:11:54 | 显示全部楼层 |阅读模式
        R语言角色对象duplicated-method()函数-中英文对照帮助文档

                                         By MicroRbt Martinez PhD

R语言函数名:duplicated-method()
R语言函数功能:角色对象
来自资源库:Bionconductor-software
duplicated-method()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。

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

The Rle class is a general container for storing an atomic vector that is stored in a run-length encoding format. It is based on the rle function from the base package.
Rle类是用于存储以游程长度编码格式存储的原子向量的通用容器。它基于基本软件包中的rle函数。


-----Constructor-----

Rle(values, lengths): This constructor creates an Rle instance out of an atomic vector or factor object values and an integer or numeric vector lengths with all positive elements that represent how many times each value is repeated. The length of these two vectors must be the same. lengths can be missing in which case values is turned into an Rle.
Rle(values, lengths):此构造函数根据原子向量或因子对象values和整数或数值向量lengths创建Rle实例,该整数或数值向量均带有表示每个值重复多少次的所有正元素。这两个向量的长度必须相同。 lengths可能会丢失,在这种情况下values会变成Rle。


-----Getters-----

In the code snippets below, x is an Rle object:
在下面的代码段中,x是一个Rle对象:

runLength(x): Returns the run lengths for x.
runLength(x):返回x的运行长度。

runValue(x): Returns the run values for x.
runValue(x):返回x的运行值。

nrun(x): Returns the number of runs in x.
nrun(x):返回x中的运行次数。

start(x): Returns the starts of the runs for x.
start(x):返回x的运行开始。

end(x): Returns the ends of the runs for x.
end(x):返回x的运行结束。

width(x): Same as runLength(x).
width(x):与runLength(x)相同。


-----Setters-----

In the code snippets below, x is an Rle object:
在下面的代码段中,x是一个Rle对象:

runLength(x) <- value: Replaces x with a new Rle object using run values runValue(x) and run lengths value.
runLength(x) <- value:使用游程值runValue(x)和游程长度value,用新的Rle对象替换x。

runValue(x) <- value: Replaces x with a new Rle object using run values value and run lengths runLength(x).
runValue(x) <- value:使用运行值value和运行长度runLength(x),用新的Rle对象替换x。


-----Coercion-----

In the code snippets below, from is an atomic vector:
在下面的代码段中,from是原子向量:

as(from, "Rle"): This coercion creates an Rle instances out of an atomic vector from.
as(from, "Rle"):此强制将根据原子向量from创建一个Rle实例。

In the code snippets below, x and from are Rle objects:
在下面的代码段中,x和from是Rle对象:

as.vector(x, mode="any"), as(from, "vector"): Creates an atomic vector based on the values contained in x. The vector will be coerced to the requested mode, unless mode is "any", in which case the most appropriate type is chosen.
as.vector(x, mode="any"),as(from, "vector"):基于x中包含的值创建原子向量。除非mode是“ any”,否则矢量将被强制转换为请求的mode,在这种情况下,将选择最合适的类型。

as.factor(x), as(from, "factor"): Creates a factor object based on the values contained in x.
as.factor(x),as(from, "factor"):基于x中包含的值创建因子对象。

as.data.frame(x), as(from, "data.frame"): Creates a data.frame with a single column holding the result of as.vector(x).
as.data.frame(x),as(from, "data.frame"):创建一个data.frame,其中的单列保存as.vec
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
购买主题 前行需要您的支持,请赞助作者 【15 金钱】 就能浏览全部100%内容啦!(本贴一次赞助、永久可读)
回复

使用道具 举报

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

本版积分规则

手机版|小黑屋|Archiver|R语言中文网    

GMT+8, 2024-5-29 12:20 , Processed in 0.030572 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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