regroup_curves: Re-calculate group curves data.

Description Usage Arguments Details Value Note Author(s)

View source: R/utilities.R

Description

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.

Usage

1
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.

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.

Value

ZGroupCurvesDataFrame with new group statistics.

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.

Author(s)

Joona Lehtomaki <joona.lehtomaki@gmail.com>


cbig/zonator documentation built on May 23, 2020, 7:02 a.m.