Fill in based on relationship between NUMERATOR_c and DENOMINATOR_c. E.g., yield = production / area. NUMERATOR_c will be linearly interpolated forward then NUMERATOR_FILL_DIRECTION. Yield will be filled down-up, World average yield is used when only NUMERATOR_c or DENOMINATOR_c is available

FF_FILL_NUMERATOR_DENOMINATOR(
  .DF,
  NUMERATOR_c,
  DENOMINATOR_c,
  NUMERATOR_FILL_DIRECTION = "down"
)

Arguments

.DF

Input data frame

NUMERATOR_c

NUMERATOR col name (production) in the ratio

DENOMINATOR_c

DENOMINATOR col name (area) in the ratio

NUMERATOR_FILL_DIRECTION

Direction of filling in NUMERATOR

Value

A data frame with missing values filled