Return group average

description: This function calculates and returns the average value for each defined group (for example per site, per year, per season and per HELCOM_ID) (R function 'mean_by_group').

daugava use case AquaINFRA mean_by_group R

Inputs
Id Title Data Type Description
input_data Input table string URL to the input table containing group identifier(s) and a value column. Groups are defined by one or more columns. Other columns present in the table will be removed in the process, retaining only those specified in cols_to_group_by and value_col. For example, use the result table from peri_conv.
colnames_to_group_by Column names identifying group string One or more column names identifying the group. A combination of all specified columns will be used to define unique groups for calculating the average value. Example: "longitude, latitude, Year_adj_generated, group_labels, HELCOM_ID". Another example: "Year_adj_generated, group_labels, HELCOM_ID".
colname_value Column name for column containing values string The name of the column that contains the values for which the average will be calculated. Only one column name can be included. Examples: "transparency_m", "mean"
Outputs
Id Title Description
mean_by_group Group average values (result table) A table containing the unique groups defined by "colnames_to_group_by" and the corresponding average values for each group, based on the column specified in "colname_value".

Educational resources and documentation

Jobs

Browse jobs

Links

Execution modes

  • Synchronous
  • Asynchronous