extractSpectra-methods(MSnbase)
extractSpectra-methods()所属R语言包:MSnbase
Extracts a set of spectra from an 'MSnExp' object
从MSnExp“对象提取一组谱
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Extracts the spectra defined by the selected parameter and returns a subset "MSnExp" instance. The featureData slot is also subset accordingly.
光谱提取selected参数定义和返回"MSnExp"实例的一个子集。 featureData槽也相应的子集。
Note that values in selected are recycled if shorter than length(MSnExp).
注意在值selected回收比length(MSnExp)短。
This method is equivalent as using the [ operator.
这种方法是相当于[运营商。
方法----------Methods----------
Returns an "MSnExp" object containing spectra defined by the logical selected argument.
返回"MSnExp"对象,它包含逻辑selected参数定义的光谱。
作者(S)----------Author(s)----------
Laurent Gatto <lg390@cam.ac.uk>
参见----------See Also----------
extractPrecSpectra
extractPrecSpectra
举例----------Examples----------
file <- dir(system.file(package="MSnbase",dir="extdata"),
full.name=TRUE,pattern="mzXML$")
aa <- readMSData(file,verbose=FALSE)
sel <- rep(FALSE,length(aa))
sel[1:3] <- TRUE
bb <- extractSpectra(aa,sel)
stopifnot(length(bb) == sum(sel))
processingData(bb)
## equivalent[#相当于]
cc <- aa[sel]
all(featureNames(cc)==featureNames(bb))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|