How to remove rows with 0 values using R

后端 未结 1 1173
闹比i
闹比i 2020-12-03 03:45

Hi am using a matrix of gene expression, frag counts to calculate differentially expressed genes. I would like to know how to remove the rows which have values as 0. Then my

1条回答
  •  孤城傲影
    2020-12-03 04:34

    df[apply(df[,-1], 1, function(x) !all(x==0)),]
    

    0 讨论(0)
提交回复
热议问题