# NOT RUN {
pop <- sample(1:50, 5)
# Create similarity matrix
Z <- diag(1, length(pop))
Z[Z==0] <- 0.4
dat <- metacommunity(pop, Z)
# Calculate similarity-sensitive diversity of order 0 (species richness)
qDZ(dat, 0)
# }
Run the code above in your browser using DataLab