User Tools

Site Tools


This is an old revision of the document!

Numerical classification

TWINSPAN - hierarchical divisive classification

I created experimental R library with TWINSPAN algorithm - you may install it from GitHub repository (note: this library is currently in beta stage under development, and some parts may not be functional). To install any library from GitHub, you will need to first install package devtools written by Wickham Hadley, which contains a set of tools for development of R packages. After installing devtools, use the function install_github.

install.packages ('devtools')

Run TWINSPAN example1), which shows modified TWINSPAN on traditional Ellenberg's Danube meadow dataset, projected on DCA ordination diagram and compared with original classification into three vegetation types made by tabular sorting:

library (twinspanR)
library (vegan)
data (danube)
res <- twinspan (danube$spe, modif = TRUE, clusters = 4)
k <- cut (res)
dca <- decorana (danube$spe)
par (mfrow = c(1,2))
ordiplot (dca, type = 'n', display = 'si', main = 'Modified TWINSPAN')
points (dca, col = k)
for (i in c(1,2,4)) ordihull (dca, groups = k, = i, col = i,
 draw = 'polygon', label = TRUE)
ordiplot (dca, type = 'n', display = 'si', main = 'Original assignment\n (Ellenberg 1954)')
points (dca, col = danube$env$veg.type)
for (i in c(1:3)) ordihull (dca, groups = danube$env$veg.type, = unique (danube$env$veg.type)[i], col = i,
 draw = 'polygon', label = TRUE)
You would get the same result as the script below if you run example (twinspan) - this will run the example which comes with the help file of twinspan function (see the section Examples in ?twinspan).
en/hier-divisive.1429820848.txt.gz · Last modified: 2017/10/11 20:36 (external edit)