Could a parameter maxfill be added to nafill? maxfill is an integer. When the number of consecutive NA values filled downward by a non-NA value exceeds maxfill, the filling stops until the next non-NA value appears. This is practical in time series processing, as overly old historical data is not suitable for continued filling.