Nothing
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
This vignette demonstrates the BetaStability package using linearPred with
the Ponds dataset from the rioja package.
First, install the package from GitHub:
# Install from GitHub # install.packages("devtools") # devtools::install_github("gaoyu19920914/betaStability") # OR install from BioConductor (in the future when it's available) # if (!requireNamespace("BiocManager", quietly = TRUE)) # install.packages("BiocManager") # BiocManager::install("betaStability")
Load the BetaStability package and the rioja package for test data:
library(betaStability) library(vegan) library(ggplot2) # Check if rioja is available and install it to load dataset if (!requireNamespace("rioja", quietly = TRUE)) install.packages("rioja") data("Ponds", package = "rioja")
comtable <- Ponds$spec envmeta <- Ponds$env[, 6:19] # Calculate stability with linearPred stability_rioja_linear <- betaStability( comtable = comtable, envmeta = envmeta, method = "linearPred" ) # Inspect the result head(stability_rioja_linear) p_rioja <- plotStability(stability_rioja_linear, sitenames = Ponds$env$Name) p_rioja
print(sessionInfo())
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.