Section: [[en:classification|Numerical classification]] ===== TWINSPAN (hierarchical divisive classification) ===== [[{|width: 7em; background-color: white; color: navy}hier-divisive|Theory]] [[{|width: 7em; background-color: white; color: navy}hier-divisive_R|R functions]] [[{|width: 7em; background-color: light; color: firebrick}hier-divisive_examples|**Examples**]] ==== Example 1: How to use the twinspan library ===== Check https://github.com/jarioksa/twinspan/blob/master/README.md to see how to use ''twinspan'' library written by Jari Oksanen. ==== Example 1: Modified TWINSPAN on Danube dataset ==== Run TWINSPAN example using package ''twinspanR''((You would get the same result as the script below if you run ''example (twinspan)'' from ''library (twinspanR)''.)), which demonstrates application of the modified TWINSPAN on a classical Ellenberg's Danube meadow dataset. Results of TWINSPAN classification are then projected on the DCA ordination diagram and compared with the original classification into three vegetation types (plus one not-classified relevé) 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, show.group = 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, show.group = unique (danube$env$veg.type)[i], col = i, draw = 'polygon', label = TRUE) {{:obrazky:twinspan-example-danube-dataset.png?direct|}}