我想从R中的ExpressionSet的phenoData中选择列。我要处理的数据是teset。
class(teset)
[1] "ExpressionSet"
attr(,"package")
[1] "Biobase"
teset
ExpressionSet (storageMode: lockedEnvironment)
assayData: 19420 features, 253 samples
element names: exprs
protocolData: none
phenoData
sampleNames: TCGA-CV-7091-01A-11D-2012-08 TCGA-CJ-4875-01A-01D-1373-10 ...
TCGA-25-1626-01A-01W-0615-10 (253 total)
varLabels: time status ... Tumor_grade (7 total)
varMetadata: labelDescription
featureData
featureNames: 1060P11.3 A1BG ... ZZZ3 (19420 total)
fvarLabels: EntrezID Symbol Desc Synonyms
fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation:
协调teset的信息:
names(pData(teset))
[1] "time" "status" "Age" "Gender"
[5] "TCGA_tumor_type" "Tumor_stage" "Tumor_grade"
我只想要一个没有pData中前两列的teset数据,即所有exprs数据都带有pData(teset)[, - c(1,2)]。我怎样才能做到这一点?谢谢你的帮助!
答案 0 :(得分:0)
我自己通过创建一个新解决方案找到了解决方案。我希望可能有更好的一个:
te = ExpressionSet(assayData = exprs(teset),phenoData = phenoData(teset)[, - c(1,2)])