Impute missing values of a count variable. Imputation is done by counting from the last known value. Example: c(NA,4,NA,NA) then becomes c(NA,4,NA,NA).
fill_missing_rownumber(x)
Integer vector.
Integer vector with filled values.
fill_missing_rownumber(c(NA,4,NA,NA))
#> [1] NA 4 5 6