ez.dropna | R Documentation |
could also accept a vector/factor as input, if so, then col,n,reindex ignored (factor->char->factor)
ez.dropna(x, col = NULL, n = 0, reindex = TRUE, print2scr = TRUE)
x |
a data frame, or a vector |
col |
internally evaluated by eval('dplyr::select()'), restrict to the columns where you would like to search for NA; eg, 3, c(3), 2:5, "place", c("place","age")
|
n |
integer or vector, 0, c(3,5), number/range of NAs allowed.
|
reindex |
whether to keep original row index or reindex
|
print2scr |
T/F. if T, print out rows containing NAs dropped (In: -> Out: ) |
returns a new df with rows that have NA(s) removed, or a new vector/factor without NAs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.