cmps_na_trim.Rd
Remove the leading and trailing missing values in a numeric vector
cmps_na_trim(x)
numeric vector
a numeric vector; only the leading and trailing missing values are removed
x <- c(NA, 1, 2, 3, 4, NA) cmps_na_trim(x) #> [1] 1 2 3 4