replace NA by value of previous record

fillNAForward(x, firstValue = median(x, na.rm = TRUE))

Arguments

x

numeric vector to fill NAs

firstValue

value to be used for NA at the beginning of x

Value

numeric vector with NAs replaced