Omit rows containing specific column of NA

前端 未结 8 1163
感动是毒
感动是毒 2020-11-27 10:39

I want to know how to omit NA values in a data frame, but only in some columns I am interested in.

For example,

DF <- data.frame(x =          


        
8条回答
  •  抹茶落季
    2020-11-27 11:08

    It is possible to use na.omit for data.table:

    na.omit(data, cols = c("x", "z"))
    

提交回复
热议问题