top(genomes)
top()所属R语言包:genomes
Find the most common values
最常用的值
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Finds the most common values in a vector with repeating elements.
发现重复的元素的向量中最常见的值。
用法----------Usage----------
top(x, n = 10)
参数----------Arguments----------
参数:x
A vector with some repeating elements
一些重复的元素的向量
参数:n
The number of top elements
顶级元素的数目
Details
详情----------Details----------
top returns a logical vector indicating if the element is one of the most common values in the vector
top返回一个逻辑向量表示,如果该元素是一个向量中最常见的值
值----------Value----------
A logical vector indicating if the element is one of the top values.
逻辑向量表示,如果该元素是一个最高值。
注意----------Note----------
This will mostly be useful in conjunction with the subset function.
这将主要是有用的subset函数的结合。
作者(S)----------Author(s)----------
Chris Stubben
参见----------See Also----------
like
like
举例----------Examples----------
x <- c("a", "b", "b", "c")
top(x, 1)
#top is a short cut for[顶部是一个捷径]
x %in% names(sort( table(x), decreasing=TRUE))[1]
data(lproks)
x <- subset(lproks, status != 'In Progress' , c(name, status, released))
# get top 15 genera[获得前15属]
x <- subset(x, top(genus(name), 15))
x$status[x$status == 'Assembly'] <- 'WGS'
y <- table(genus(x$name), x$status)
y <- cbind(y, Total=rowSums(y))
y <- y[order(y[ ,3]), ] # order by total[总整理]
dotplot(y , xlab=list("Number of genomes at NCBI",cex=.8),
par.settings=list(superpose.symbol=list(pch=15:17)),
auto.key=list(cex=.8, columns=3, between=.5, between.columns=1))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|