Learn R Programming

webSDM (version 1.1-5)

plotG: Plots the metaweb G

Description

Plots the metaweb G used to fit the trophicSDM model

Usage

plotG(tSDM)

Value

A ggnet object

Arguments

tSDM

A trophicSDMfit object obtained with trophicSDM()

Author

Giovanni Poggiato

Examples

Run this code
data(Y, X, G)
# define abiotic part of the model
env.formula = "~ X_1 + X_2"
# Run the model with bottom-up control using stan_glm as fitting method and no penalisation
# (set iter = 1000 to obtain reliable results)
m = trophicSDM(Y, X, G, env.formula, iter = 100,
               family = binomial(link = "logit"), penal = NULL, 
               mode = "prey", method = "stan_glm")
# \donttest{
plotG(m)
# }

Run the code above in your browser using DataLab