Skip to contents

[Stable]

drop_na() remove all NA values from an atomic object.

Usage

drop_na(x)

Arguments

x

An atomic object of any type.

Value

An object of the same type as x with all NA values removed.

See also

Other vector functions.: count_na(), inbetween_integers()

Examples

drop_na(c(1, NA, 2, 3, NA, 4))
#> [1] 1 2 3 4
#> [1] 1 2 3 4 # Expected

drop_na(c("a", NA, "b", "c"))
#> [1] "a" "b" "c"
#> [1] "a" "b" "c" # Expected