Find columns with all missing values

后端 未结 8 483
Happy的楠姐
Happy的楠姐 2020-12-09 08:42

I am writing a function, which needs a check on whether (and which!) column (variable) has all missing values (NA, ). The following is fr

8条回答
  •  甜味超标
    2020-12-09 08:55

    This one will generate the column names that are full of NAs:

    library(purrr)
    df %>% keep(~all(is.na(.x))) %>% names
    

提交回复
热议问题