| filldown {MESS} | R Documentation |
Fill down missing values with the latest non-missing value
filldown(x)
x |
A vector |
A vector or list with the NA's replaced by the last observed value.
Claus Ekstrom <claus@rprimer.dk>
a <- c(1:5, "Howdy", NA, NA, 2:3, NA) filldown(a) filldown(c(NA, NA, NA, 3:5))