na_rm | R Documentation |
This is a wrapper around stats::na_omit()
which hides its annoying printing
behaviour when applied to a vector.
na_rm(obj)
obj |
(Vector/List/Matrix/Dataframe) The thing to remove |
A copy of obj
without NAs.
na_rm(c("a", NA, "b", NA, "c", "d"))
#> [1] "a" "b" "c" "d"
na_rm(data.frame(col1 = 1:5, col2 = c("a", NA, "c", "d", NA)))
#> col1 col2
#> 1 1 a
#> 3 3 c
#> 4 4 d
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.