Title
Usage
create_impact_cube_data(
cube_data,
impact_data,
trans = 1,
col_category = NULL,
col_species = NULL,
col_mechanism = NULL,
region = NULL
)Arguments
- cube_data
A dataframe of a cube ( $data slot) of class
sim_cubeorprocessed_cubefromb3gbi::process_cube().- impact_data
The dataframe of species impact which contains columns of
impact_category,scientific_nameandimpact_mechanism.- trans
Numeric:
1(default),2or3. The method of transformation to convert the EICAT categoriesc("MC", "MN", "MO", "MR", "MV")to numerical values:1: converts the categories toc(0, 1, 2, 3, 4)2: converts the categories to toc(1, 2, 3, 4, 5)3: converts the categories to toc(1, 10, 100, 1000, 10000)
- col_category
The name of the column containing the impact categories. The first two letters each categories must be an EICAT short names (e.g "MC - Minimal concern").
- col_species
The name of the column containing species names.
- col_mechanism
The name of the column containing mechanisms of impact.
- region
The shape file of the specific region to calculate the indicator on. If NULL (default), the indicator is calculated for all cells in the cube.
Examples
library(b3gbi) # for processing cube
acacia_cube <- process_cube(cube_name = cube_acacia_SA,
grid_type = "eqdgc",
first_year = 2010,
last_year = 2024)
impact_value <- create_impact_cube_data(
cube_data = acacia_cube$data,
impact_data = eicat_acacia,
)
