# load and look at the rotif.env presence-absence data:
data(rotif.env)
head(rotif.env)
names(rotif.env)
# build a matrix of similarity among these binary data
# using e.g. Jaccard's index:
bin.sim.mat <- simMat(rotif.env[ , 18:47], method = "Jaccard")
head(bin.sim.mat)
if (FALSE) {
# compute a fuzzy version of the presence-absence data
# based on inverse distance to presences:
rotifers.invd <- distPres(rotif.env, sp.cols = 18:47,
coord.cols = c("Longitude", "Latitude"), id.col = 1, suffix = ".d",
p = 1, inv = TRUE)
head(rotifers.invd)
# build a matrix of fuzzy similarity among these fuzzy
# distribution data, using the fuzzy version of Jaccard's index:
fuz.sim.mat <- simMat(rotifers.invd[ , -1], method = "Jaccard")
head(fuz.sim.mat)
# plot the similarity matrices:
heatmap(bin.sim.mat, scale = "none", cexRow = 0.5, cexCol = 0.5,
main = "Binary similarity")
heatmap(fuz.sim.mat, scale = "none", cexRow = 0.5, cexCol = 0.5,
main = "Fuzzy similarity")
}
# you can get fuzzy chorotypes from these similarity matrices
# (or fuzzy biotic regions if you transpose 'data',
# so that localities are in columns and species in rows)
# using the RMACOQUI package (Olivero et al. 2011)
Run the code above in your browser using DataLab