
Update raw damagement costs for a crop
update_raw_damage.Rd`update_raw_damage()` updates raw damagement costs for one or more crops from `floodam.agri` vulnerability files using a production cost index.
Usage
update_raw_damage(
path = path,
culture = NULL,
year_new = "2025",
year_origin = "2016",
index_prod,
global_prod_id = "010776857",
retrieve_info = FALSE,
verbose = TRUE
)Arguments
- path
list describing where to find useful paths. Result of `init_path()`.
- culture
character indicating which crop to consider update, if NULL then all crops in `dir(path[["output"]][["culture"]])` are considered, default to NULL.
- year_new
character, year for which the action values need to be updated.
- year_origin
character, base year used as the reference point for calculating index adjustments. Default to "2016".
- index_prod
data.frame, production index used to adjust damagement costs
- global_prod_id
character, id of the production index used. This information is not essential, it is only used to keep track of the index that is used to update damagement costs. It is only used if `retrieve_info = TRUE`
- retrieve_info
boolean, return detailed information about the updates (coefficients, index values, original costs...) or not. Default to `FALSE`.
- verbose
boolean, will floodam tell what it is doing, default to TRUE
Examples
if (FALSE) { # \dontrun{
destination = tempdir()
download_saa(destination)
adapt_saa(
origin = destination,
destination = destination,
scope = "departement"
)
adapt_saa_floodam(
origin = destination,
destination = destination,
archive = "SAA_2010-2024_departement.csv",
scope = "departement",
extent = "Hérault",
year = "2024",
verbose = TRUE
)
} # }