我是IRanges包的新手,在获取IRange的最终值时遇到了麻烦。我能够毫无问题地获得start和width的值,这让我有点困惑,我的end的大小写/拼写与标题行匹配。有没有其他人遇到过这种情况,或者请找出我做错了什么?谢谢,非常感谢!
library(IRanges)
> test=IRanges(100645,100664)
> test
IRanges of length 1
start end width
[1] 100645 100664 20
> test@start
[1] 100645
> test@width
[1] 20
> test@end
Error: no slot of name "end" for this object of class "IRanges"发布于 2012-03-17 11:57:27
访问IRange对象字段的最简单方式是使用助手函数:start()、end()和width()。它们将返回一个向量,其中包含相应列的所有元素。
发布于 2012-03-17 11:19:48
没有使用该包的经验,但基于?"class:Ranges"
end(test$ranges[1])它还有助于在未来提供可重现的样本数据。
https://stackoverflow.com/questions/9746637
复制相似问题