When results grouping is changed group-specific curves data has to be re-calculated. Normally group curves file is produced by Zonation based on the groupings provided by the user. Same information can almost completely (except for ext-values) be calculated afterwards from the feature-specific curves files.

regroup_curves(x, weights, group.ids)

Arguments

x

Data frame of feature specific representation levels.

weights

numeric vector for feature specific weights

group.ids

numeric vector of new group codes. Number of groups must match with columns in x.

Value

ZGroupCurvesDataFrame with new group statistics.

Details

This function calculates the following stats for Zvariant object based on a vector of new group IDs:

min:

Minimum value of representation on each iteration among features within a group.

mean:

Mean value of representation on each iteration among features within a group.

max:

Maximum value of representation on each iteration among features within a group.

w.mean:

Weighted (based on feature weight) mean value of representation on each iteration among features within a group.

Note

Current implementation does not calculate values for ext2 (extinction risk). Column ext2 is retained in the returned data frame for compatibility, but column will be populated with NAs.