# NOT RUN {
#### Artificial dataset:
SyntheticTrial <- SyntheticData(SpeciesNum = 21, CommunityNum = 3,
SpCo = NULL, Length = 500,
Parameters = list(a=rep(60, 3),
b=c(0,250,500),
c=rep(0.015,3)),
pal = c("#008585", "#FBF2C4", "#C7522B"))
## Analyses:
SyntheticEcoFinder <- EcotoneFinder(data = SyntheticTrial[,-1],
dist = SyntheticTrial$Distance,
method = "all",
groups = 3, standardize = "hellinger",
diversity = "all")
## Percentage plot:
SyntheticNetwork <- NetworkEco(SyntheticEcoFinder, threshold = .3, method = "cmeans",
plot.type = "percentage", dist = "count")
## Heatmap plot:
SyntheticNetwork <- NetworkEco(SyntheticEcoFinder, plot.type = "heatmap",
method = "cmeans", dist = "raw", plot = "species")
## Network:
# From raw membership grades:
SyntheticNetwork <- NetworkEco(SyntheticEcoFinder, plot.type = "network",
method = "cmeans", dist = "raw", plot = "species")
# From number of species per clusters:
SyntheticNetwork <- NetworkEco(SyntheticEcoFinder, plot.type = "network", threshold = .3,
method = "cmeans", dist = "count", plot = "community",
layout = "spring")
# }
Run the code above in your browser using DataLab