op_calculate: This function of Optimos Prime calculates optima and...

Description Usage Arguments Examples

View source: R/op_calculate.R

Description

You will need two data frames. If they are not specified as arguments, you will be prompted to import them from CSV format. The resulting data frame from the op_calculate() function will be a data frame of species (rows) and the optima and tolerance range (+ and -) of the environmental variables (columns)

The calculations for optima and tolerance ranges is conducted according to the article by Potapova & Charles (2003):

Sample data is taken from:

Usage

1
2

Arguments

environmental_df

The data frame with your environmental data. Variables as rows, Sites as columns

species_df

The data frame with your species densities. Species as rows, Sites as columns.

isRelAb

Boolean. If set to 'TRUE' it means that your species' data is the relative abundance of each species per site. If FALSE, it means that it the data corresponds to absolute densities. Default = TRUE

islog10

Boolean. If set to 'TRUE' it means that your environmental data is already transformed to log10. Default = FALSE

Examples

1
2
3
4
5
6
7
8
# EXAMPLE 1: Loads sample data where species are in relative abundance (percent)
data("environmental_data")
data("species_data")
# EXAMPLE 2: Loads sample data where species are in absolute densities
data("environmental_data_example2")
data("species_data_example2")
# Calculates the autoecological data
optimos.prime::op_calculate(environmental_df, species_df)

optimos.prime documentation built on March 26, 2020, 7:27 p.m.