
MacKin
The R code iFEED_TNT.R produces the nutrition security results presented in the associated Zambia analysis. This code produces output files for all climate models and scenarios presented in the paper.
The R code iFEED_land_use_allocation.R produces the food production results associated with each scenario and climate model, as used as input to iFEED_TNT.R (via glam_prod.csv).
This code was developed and tested under the following conditions:
The Conda environment installs the correct version of R (4.5.2) and all required libraries.
INSTALLATION, SETUP AND CREATING OUTPUTS
conda env create -f environment.yml
conda activate iFEED_Zambia
Rscript -e "library(writexl); library(codetools); print('Setup Successful')"
5. Running the scripts:
Rscript iFEED_land_use_allocation.R
Rscript iFEED_TNT.R
6. Outputs: The outputs of the paper can be found in the “paper_outputs” directory. After running the scripts, outputs will be saved in the “out” directory to compare.