rdpi | R Documentation |
Function to compute the RDPI (Relative Distance Plasticity Index, Valladares et al, (2006) Quantitative estimation of phenotypic plasticity: bridging the gap between the evolutionary concept and its ecological applications, Journal of Ecology, 94(6):1103-1116.
rdpi(dataframe, sp, trait, factor)
dataframe |
The dataframe that contains the data |
sp |
The bare (unquoted) name of the column whose values will be used as independent variable. The function will compare RDPI values among values of this variable. It can be species, provenances, etc. |
trait |
The bare (unquoted) name of the column that holds the trait for which to calculate RDPI. Must be numeric |
factor |
the bare (unquoted) name of the column that holds the environmental factor for which we will calculate RDPI. By definition, RDPI computes distances between pairs of observations that are at different levels of this factor. |
This function computes RDPI to the environmental factor for each species of the dataset(or any other identifying variable defined in 'sp') Then it makes an ANOVA or t-test of the values of RDPI across species and plots the boxplot
data(ecophysio)
rdpi(ecophysio,sp,SB, Piso)
# if we want to store the values
foo <- rdpi(ecophysio,Species,SB, Stage)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.