Description Usage Arguments Details See Also Examples
This module calculates the amount of production (in tonnes) for each modelled crop, given user-specified targets, how much of it can be met on existing cropland, and how much needs to come from new cropland. This version works with dta.tables.
1 | targets_dt(prod_targ, currprod, potprod)
|
prod_targ |
A named list given the production targets for each crop as a multiple (greater than 1) |
currprod |
A data.table of the current production coming from existing croplands |
potprod |
A data.table of the potential production on existing croplands |
If there is a modification to yield potentials due to climate change or irrigation, potprod
(which is again only the potential production on existing croplands) should be extracted from the results
of the yield_mod_dt
function.
targets_r
for raster-based version
1 2 3 4 5 6 7 8 9 | il <- fetch_inputs(input_key = "ZA") # fetch all necessary inputs
ybetas <- list(1, 1)
ybeta <- yield_mod_dt(inlist = il[c("p_yield", "pp_curr")], ybetas = ybetas,
code = rc, cropnames = il$cropnames)
potprod <- ybeta$pp_curr
currprod <- il$currprod
prod_targ <- c("maize" = 2, "cassava" = 2, "ground" = 2, "cotton" = 2, "soy" = 2, "pulse" = 2,
"sunflower" = 2, "sugarcane" = 2, "wheat" = 2)
t_dt <- targets_dt(prod_targ, currprod, potprod)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.