Replace previous NAs with latest non-NA value while keeping subsequent NAs
In a data.table
, I would like to fill forward previous NAs with the closest previous non-NA value, similar to this post
In a data.table
, I would like to fill forward previous NAs with the closest previous non-NA value, similar to this post