spm_aggregate | R Documentation |
Aggregate the data contained in a dataset or fit based on the discretized boundaries, using a function and a filling value.
spm_aggregate(
sspm_object,
boundaries,
level = "patch",
type = "data",
variable,
fun,
group_by = "spacetime",
fill = FALSE,
apply_to_df = FALSE,
...
)
## S4 method for signature 'sspm_dataset,missing'
spm_aggregate(
sspm_object,
boundaries,
level = "patch",
type = "data",
variable,
fun,
group_by = "spacetime",
fill = FALSE,
apply_to_df = FALSE,
...
)
## S4 method for signature 'sspm_dataset,sspm_discrete_boundary'
spm_aggregate(
sspm_object,
boundaries,
level = "patch",
type = "data",
variable,
fun,
group_by = "spacetime",
fill = FALSE,
apply_to_df = FALSE,
...
)
sspm_object |
[sspm_dataset or sspm_fit] The dataset object. |
boundaries |
[sspm_discrete_boundary] The boundaries object (optionnal). |
level |
[character] The aggregation level, "patch" or "boundary". |
type |
[character] The targeted type of aggregation, one of "data" for base data or "smoothed" for smoothed data. |
variable |
[character] Variable to aggregate (ignored in case
|
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
or sspm_fit
.
## Not run:
spm_aggregate(sspm_object = catch,
boundaries = spm_boundaries(biomass),
variable = catch_variable,
fun = fun, group_by = group_by,
fill = fill, apply_to_df = apply_to_df,
na.rm = TRUE, ...)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.