powered by
Remove the leading and trailing missing values in a numeric vector
cmps_na_trim(x)
a numeric vector; only the leading and trailing missing values are removed
numeric vector
x <- c(NA, 1, 2, 3, 4, NA) cmps_na_trim(x)
Run the code above in your browser using DataLab