使用R

时间:2017-02-16 02:38:42

标签: r subset

如果可以在DataframeB中找到行名,我想要对DataframeA$GENE_NAME进行分组。两个Dataframe的内部看起来像:

> head(DataframeA,n=5)
      GENE_NAME REFSEQ_ID       PROXIMAL_ENHANCERS ENHANCER_RANKS IS_SUPER
1        Mir715 NR_030494  chr17:39979923-39985799              3        1
2       Fam118b NM_194257   chr9:35112749-35113239              5        1
3        Rpusd4 NM_028040   chr9:35112749-35113239              5        1
4          Mid1 NM_183151 chrX:166423967-166446961              6        1
5 G530011O06Rik NR_029457 chrX:166423967-166446961              6        1
> head(DataframeB, n=5)
               baseMean log2FoldChange     lfcSE      stat       pvalue
0610010K14Rik 271.52224     -0.7115865 0.1917668 -3.710687 0.0002066974
0610011F06Rik 212.06510      0.7205455 0.2171168  3.318700 0.0009043745
1500011B03Rik 288.32598      0.6187032 0.1926014  3.212351 0.0013165361
1700001O22Rik  13.46958      1.9938687 0.6275085  3.177437 0.0014858295
2410004P03Rik  10.72670      2.4725729 0.6687932  3.697067 0.0002181051
                    padj
0610010K14Rik 0.01132025
0610011F06Rik 0.03132753
1500011B03Rik 0.04193546
1700001O22Rik 0.04585224
2410004P03Rik 0.01159125

我可以做基本的子集,如:

Subset_of_DataframeB <- subset(DataframeB, padj < 0.05)

0 个答案:

没有答案