plot.sjSDM | R Documentation |
Plotting coefficients returned by sjSDM model. This function only for model fitted by linear, fitted by DNN is not yet supported.
## S3 method for class 'sjSDM'
plot(x, ...)
x |
a model fitted by |
... |
Additional arguments to pass to |
ggplot2 object for linear sjSDM model and nothing for DNN sjSDM model.
CAI Wang
plotsjSDMcoef
## Not run:
library(sjSDM)
# simulate community:
com = simulate_SDM(env = 6L, species = 7L, sites = 100L)
# fit model:
model = sjSDM(Y = com$response,env = com$env_weights, iter = 2L, se = TRUE,
verbose = FALSE)
# normal plot
plot(model)
# colored by groups
species=c("sp1","sp2","sp3","sp4","sp5","sp6","sp7")
group=c("mammal","bird","fish","fish","mammal","amphibian","amphibian")
group = data.frame(species=species,group=group)
plot(model,group=group)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.