combineFeatures(MSnbase)
combineFeatures()所属R语言包:MSnbase
Combines features in an 'MSnSet' object
在MSnSet“对象相结合的特点
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function combines the features in an "MSnSet" instance applying a summarisation function (see fun argument) to sets of features as defined by a factor (see groupBy argument).
此功能结合在一个"MSnSet"实例的特性,应用summarisation功能(见fun参数)的功能集定义的一个因素(见groupBy参数)。
用法----------Usage----------
combineFeatures(object, groupBy, fun = c("mean", "median", "weighted.mean", "sum", "medpolish"), ..., verbose = TRUE)
参数----------Arguments----------
参数:object
An instance of class "MSnSet" whose features will be summerised.
"MSnSet"类的一个实例,其功能将summerised。
参数:groupBy
An object of class factor defining how to summerise the features.
一个要素类的对象,定义如何summerise功能。
参数:fun
The summerising function. Currently, mean, median, weighted mean, sum and median polish are implemented, but user-defined functions can also be supplied.
summerising功能。目前,平均,中位数,加权平均,总结和中位数波兰实施,但也可提供用户定义的函数。
参数:...
Additional arguments for the fun function.
fun函数的附加参数。
参数:verbose
A logical indicating whether verbose output is to be printed out.
一个logical指示是否是要打印出详细的输出。
值----------Value----------
A new "MSnSet" instance is returned with ncol (i.e. number of samples) is unchanged, but nrow (i.e. the number od features) is now equals to the number of levels in groupBy. The feature metadata (featureData slot) is updated accordingly and only the first occurrence of a feature in the original feature meta-data is kept.
一个新的"MSnSet"实例返回ncol(即样本数)是不变的,但nrow(即数量OD特点)现在是等于在各级<X >该功能的元数据(groupBy插槽)相应的更新,并保留原始特征元数据的功能第一次出现。
作者(S)----------Author(s)----------
Laurent Gatto <lg390@cam.ac.uk>
举例----------Examples----------
file <- dir(system.file(package="MSnbase",dir="extdata"),
full.name=TRUE,
pattern="mzXML$")
aa <- readMSData(file)
aa.quant <- quantify(aa,method="max",reporters=iTRAQ4)
dim(aa.quant)
## arbitrary grouping into two groups[#任意分组分为两组]
grp <- as.factor(c(1,1,2,2,2))
aa.quant.comb <- combineFeatures(aa.quant,grp,"sum")
dim(aa.quant.comb)
exprs(aa.quant.comb)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|