Remove the leading and trailing missing values in a numeric vector

cmps_na_trim(x)

Arguments

x

numeric vector

Value

a numeric vector; only the leading and trailing missing values are removed

Examples

x <- c(NA, 1, 2, 3, 4, NA)
cmps_na_trim(x)
#> [1] 1 2 3 4