R/xfaostat_helper_funcs.R
FF_FILL_NUMERATOR_DENOMINATOR.Rd
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"
)
Input data frame
NUMERATOR col name (production) in the ratio
DENOMINATOR col name (area) in the ratio
Direction of filling in NUMERATOR
A data frame with missing values filled