rescale_species: Rescale species values for indicator

View source: R/rescale_species.R

rescale_speciesR Documentation

Rescale species values for indicator

Description

This function takes in a dataframe of multi-species data and rescales them so that the value in the starting year is the same. This function accounts for species that have no data at the beginning of the period or those that have no data at teh end of the period.

Usage

rescale_species(Data, index = 100, max = 10000, min = 1)

Arguments

Data

A matrix, the first column, named year, gives the year. Subsequent named columns give the species. Values in the table are the yearly values to be rescaled.

index

The index value for the first year, defaults to 100.

max

The upper limit allowed for scaled values. Values greater than this will be set equal to max.

min

The upper limit allowed for scaled values. Values greater than this will be set equal to min.

Value

A matrix. In each row we have the year, the species and the scaled value. There is also an additional column, 'geomean' giving the geometric mean for each year.


BiologicalRecordsCentre/BRCindicators documentation built on April 22, 2024, 2:32 p.m.