Remove columns from dataframe where some of values are NA

前端 未结 7 1345
小鲜肉
小鲜肉 2020-11-28 08:32

I have a dataframe where some of the values are NA. I would like to remove these columns.

My data.frame looks like this

    v1   v2 
1    1   NA 
2           


        
相关标签:
7条回答
  • 2020-11-28 09:34
    data[,!apply(is.na(data), 2, any)]
    
    0 讨论(0)
提交回复
热议问题