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

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

[复制链接]
发表于 2012-2-25 22:25:51 | 显示全部楼层 |阅读模式
AtomicList(IRanges)
AtomicList()所属R语言包:IRanges

                                        Lists of Atomic Vectors in Natural and Rle Form
                                         原子在自然和RLE形式向量名单

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

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

An extension of List that holds
List持有的扩展


Details

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

The lists of atomic vectors are LogicalList, IntegerList, NumericList, ComplexList, CharacterList, and RawList. There is also an RleList class for run-length encoded versions of these atomic vector types.
原子向量名单LogicalList,IntegerList,NumericList,ComplexList,CharacterList,RawList。还有RleList类运行长度编码这些原子向量类型的版本。

Each of the above mentioned classes is virtual with Compressed* and Simple* non-virtual representations.
上述类是虚拟压缩*和*非虚拟的简单交涉。


构造----------Constructors----------




LogicalList(..., compress = TRUE): Concatenates the logical vectors in ... into a new LogicalList.
LogicalList(..., compress = TRUE):串连的logical中...到一个新的LogicalList向量。




IntegerList(..., compress = TRUE): Concatenates the integer vectors in ... into a new IntegerList.
IntegerList(..., compress = TRUE):串连的integer中...到一个新的IntegerList向量。




NumericList(..., compress = TRUE): Concatenates the numeric vectors in ... into a new NumericList.
NumericList(..., compress = TRUE):串连的numeric中...到一个新的NumericList向量。




ComplexList(..., compress = TRUE): Concatenates the complex vectors in ... into a new ComplexList.
ComplexList(..., compress = TRUE):串连的complex中...到一个新的ComplexList向量。




CharacterList(..., compress = TRUE): Concatenates the character vectors in ... into a new CharacterList.
CharacterList(..., compress = TRUE):串连的character中...到一个新的CharacterList向量。




RawList(..., compress = TRUE): Concatenates the raw vectors in ... into a new RawList.
RawList(..., compress = TRUE):串连的raw中...到一个新的RawList向量。




RleList(..., compress = FALSE): Concatenates the run-length encoded atomic vectors in ... into a new RleList.
RleList(..., compress = FALSE):串连运行长度编码...到一个新的RleList原子向量。


强迫----------Coercion----------

as(from, "CompressedSplitDataFrameList"), as(from, "SimpleSplitDataFrameList"): Creates a CompressedSplitDataFrameList/SimpleSplitDataFrameList instance from an AtomicList instance.
as(from, "CompressedSplitDataFrameList"),as(from, "SimpleSplitDataFrameList"):创建一个实例CompressedSplitDataFrameList / SimpleSplitDataFrameList从AtomicList实例。

as(from, "IRangesList"), as(from, "CompressedIRangesList"), as(from, "SimpleIRangesList"): Creates a CompressedIRangesList/SimpleIRangesList instance from a LogicalList or logical RleList instance. Note that the elements of this instance are guaranteed to be normal.
as(from, "IRangesList"),as(from, "CompressedIRangesList"),as(from, "SimpleIRangesList"):创建一个从的LogicalList或逻辑RleList的实例CompressedIRangesList / SimpleIRangesList实例。请注意,此实例的元素,保证是正常的。

as(from, "NormalIRangesList"), as(from, "CompressedNormalIRangesList"), as(from, "SimpleNormalIRangesList"): Creates a CompressedNormalIRangesList/SimpleNormalIRangesList instance from a LogicalList or logical RleList instance.
as(from, "NormalIRangesList"),as(from, "CompressedNormalIRangesList"),as(from, "SimpleNormalIRangesList"):创建一个从的LogicalList或逻辑RleList的实例CompressedNormalIRangesList / SimpleNormalIRangesList实例。




as(from, "AtomicList"): If from is a vector, converts it to an AtomicList of the appropriate type.
as(from, "AtomicList"):如果from的是一个向量,它转换成适当类型的AtomicList。


集团泛型----------Group Generics----------

AtomicList objects have support for S4 group generic functionality to operate within elements across objects:
AtomicList对象有S4组内跨对象元素的通用功能的支持:




Arith "+", "-", "*", "^",
Arith"+","-","*","^"




Compare "==", ">", "<", "!=",
Compare"==",">","<","!="




Logic "&amp;", "|"
Logic"&amp;","|"




Ops "Arith", "Compare", "Logic"
Ops"Arith","Compare","Logic"




Math "abs", "sign", "sqrt", "ceiling", "floor", "trunc", "cummax", "cummin", "cumprod", "cumsum", "log", "log10", "log2", "log1p", "acos", "acosh", "asin", "asinh", "atan", "atanh", "exp", "expm1", "cos", "cosh", "sin", "sinh", "tan", "tanh", "gamma", "lgamma", "digamma", "trigamma"
Math"abs","sign","sqrt","ceiling","floor","trunc","cummax",<X >,"cummin","cumprod","cumsum","log","log10","log2","log1p","acos" "acosh","asin","asinh","atan","atanh","exp","expm1","cos", "cosh","sin","sinh","tan","tanh","gamma","lgamma","digamma"

Note the behavior of the 'cum' methods has changed in IRanges >= 1.11.19. Previously cumsum, cumprod, cummax and cummin did not operate within elements across objects as stated above. A warning is now issued  to alert users of the changed behavior; this is temporary and will be  removed in BioC 2.10. To avoid the warning wrap the call to the 'cum'
注意改变IRanges> = 19年1月11日“暨”方法的行为。以前cumsum,cumprod,cummax和芹菜没有内跨如上所述的对象元素。目前已发出警告,提醒用户改变行为,这是暂时的,将被删除BioC 2.10。为了避免警告裹呼叫“暨”




Math2 "round", "signif"
Math2"round","signif"




Summary "max", "min", "range",
Summary"max","min","range"




Complex "Arg", "Conj", "Im",
Complex"Arg","Conj","Im"

See S4groupGeneric for more details.
详情请参阅S4groupGeneric。


其他的基本方法----------Other Basic Methods----------

The AtomicList objects also support a large number of basic methods. Like the group generics above, these methods perform the corresponding operation on each element of the list separately. The methods are:
AtomicList对象还支持大量的基本方法。像组泛型以上,这些方法分别执行相应的操作列表中的每个元素。其方法是:




General %in%, is.na, match, sort,
一般%in%,is.na,match,sort




Logical !, which, which.max, which.min
逻辑!,which,which.max,which.min




Numeric diff, pmax, pmax.int, pmin, pmin.int, mean, var, cov, cor, sd,
数字diff,pmax,pmax.int,pmin,pmin.int,mean,var,cov, cor,sd




Running Window smoothEnds, runmed. runmean,
运行Window smoothEnds,runmed。 runmean




Character nchar, chartr, tolower,
字符nchar,chartr,tolower


RleList方法----------RleList Methods----------

RleList has a number of methods that are not shared by other AtomicList derivatives.
RleList有一些不其他AtomicList衍生物的共享方法。




runLength(x): Gets the run lengths of each element of the list, as an IntegerList.
runLength(x):获取列表中的每个元素运行长度,作为IntegerList的的。




runValue(x): Gets the run values of each element of the list, as an AtomicList.
runValue(x):获取列表中的每个元素的运行值,作为AtomicList。


作者(S)----------Author(s)----------


P. Aboyoun



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

List for the applicable methods.
List适用的方法。


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


  int1 <- c(1L,2L,3L,5L,2L,8L)
  int2 <- c(15L,45L,20L,1L,15L,100L,80L,5L)
  collection <- IntegerList(int1, int2)

  ## names[#名称]
  names(collection) <- c("one", "two")
  names(collection)
  names(collection) &lt;- NULL # clear names[明确的名称]
  names(collection)
  names(collection) <- "one"
  names(collection) # c("one", NA)[C(“一”,不适用)]

  ## extraction[#提取]
  collection[[1]] # range1[范围1]
  collection[["1"]] # NULL, does not exist[为NULL,不存在]
  collection[["one"]] # range1[范围1]
  collection[[NA_integer_]] # NULL[为NULL]

  ## subsetting[#子集]
  collection[numeric()] # empty[空的]
  collection[NULL] # empty[空的]
  collection[] # identity[身分]
  collection[c(TRUE, FALSE)] # first element[第一个元素]
  collection[2] # second element[第二个元素]
  collection[c(2,1)] # reversed[逆转]
  collection[-1] # drop first[删除第一]
  collection$one

  ## replacement[#替换]
  collection$one <- int2
  collection[[2]] <- int1

  ## combining[#结合]
  col1 <- IntegerList(one = int1, int2)
  col2 <- IntegerList(two = int2, one = int1)
  col3 <- IntegerList(int2)
  append(col1, col2)
  append(col1, col2, 0)
  c(col1, col2, col3)

  ## group generics[#组泛型]
  2 * col1
  col1 + col1
  col1 > 2
  log(col1)
  sum(col1)

  ## get the mean for each element[#得到每个元素的平均值]
  sapply(col1, mean)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-5 16:47 , Processed in 0.021149 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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