rfPred: calculation of stability using a random forest model.

View source: R/rfPred.R

rfPredR Documentation

calculation of stability using a random forest model.

Description

This function will take the dissimilarity matrix and the environmental matrix as input, and calculate the stability of each site using a random forest model to improve the prediction performance.

Usage

rfPred(comdist, envmeta, sitenames = NULL, seed = NULL)

Arguments

comdist

The community dissimilarity matrix

envmeta

The environmental metadata table/matrix

sitenames

The names of the site

seed

The random seed for reproducibility of the random forest model

Value

a column vector of predicted stability values for each site

Examples

library(vegan)
data(varespec)
data(varechem)
example.comdist <- vegdist(varespec[1:10,])
example.stability_RF <- rfPred(example.comdist, varechem[1:10,])


betaStability documentation built on June 5, 2026, 5:08 p.m.