rm_na_rows | R Documentation |
NA
.rm_na_rows
is useful when multiple variables/columns want to be
evaluated for NA
s and if all variables are NA
, remove the row.
rm_na_rows
avoids the use of many !is.na(variable)
filters for
wide data frames.
rm_na_rows(df, index = NA)
df |
Data frame to be filtered. |
index |
Column index of |
Stuart K. Grange
## Not run:
Remove rows which contain only NAs in all but the first two columns
data_clean <- rm_na_rows(data, -1:-2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.