spm_aggregate_catch | R Documentation |
Aggregate the catch data contained in a catch dataset and update the biomass dataset with the subtracted catch.
spm_aggregate_catch(
biomass,
catch,
biomass_variable,
catch_variable,
corrections = NULL,
fun = sum,
group_by = "spacetime",
fill,
apply_to_df = FALSE,
...
)
## S4 method for signature 'sspm_dataset,sspm_dataset,character,character'
spm_aggregate_catch(
biomass,
catch,
biomass_variable,
catch_variable,
corrections = NULL,
fun = sum,
group_by = "spacetime",
fill,
apply_to_df = FALSE,
...
)
biomass |
[sspm_dataset (smoothed)] The dataset containing the biomass variable. |
catch |
[sspm_dataset] The dataset containing the catch variable. |
biomass_variable |
[character] The biomass variab of |
catch_variable |
[character] The catch column of |
corrections |
[data.frame] Optional landings corrections. |
fun |
[function] Function to use to aggregate data. |
group_by |
[character] One of |
fill |
[logical OR numeric OR function] Whether to complete the
incomplete cases, default to |
apply_to_df |
[logical] Wether |
... |
More arguments passed onto |
Updated sspm_dataset
.
## Not run:
spm_aggregate_catch(biomass = biomass_smooth, catch = catch_dataset,
biomass_variable = "weight_per_km2",
catch_variable = "catch",
fill = mean)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.