Given a two-dimensional data frame or matrix of vegetation data and group membership of rows (releve classification) a new matrix is derived with relative species frequency (0 to 1 scale) within groups. The matrix of centroids has as many rows as there are row groups in the vegetation matrix and the same number of columns (species).

1 2 3 4 5 6 |

`nveg` |
A data frame of vegetation releves (rows) by species (columns) |

`grel` |
A vector containing group membership of releves (rows), typically generated by |

`y` |
Transformation of species scores: x'= x exp(y) |

`...` |
Further variables used for printing |

`x` |
A list of class "centroid" generated by centroid |

An output list of class "centroid" with at least the following items:

`nrelgroups` |
Number of rows of centroid table |

`nspec` |
Number of columns of centroid table |

`freq.table` |
A table of species frequencies within groups, unadjusted |

`prob.table` |
A table of species frequencies within groups, adjusted (0-1) |

`dist.mat` |
An nrelgroups by nrelgroups distance matrix of centroids |

In function Mtabs() buit in as summary method

Otto Wildi

Wildi, O. 2013. Data Analysis in Vegetation Ecology. 2nd ed. Wiley-Blackwell, Chichester.

1 2 3 4 5 6 7 8 9 10 11 12 | ```
# This generates a typical artificial vegetation data frame aveg
v1<- matrix(rep(0,200),nrow=10)
diag(v1)<-1 ; diag(v1[,2:12])<-1 ; diag(v1[,3:13])<-2 ; diag(v1[,4:14])<-1
diag(v1[,5:15])<-1 ; diag(v1[5:8,3:6])<-3 ; aveg<- data.frame(v1[,2:13])
# First, groups of releves are formed by cluster analysis
require(vegan)
dr<- vegdist(aveg^0.5,method="bray") # dr is distance matrix of rows
o.clr<- hclust(dr,method="ward") # this is clustering
grel<- cutree(o.clr,k=3) # 3 row groups formed
o.centroid<- centroid(aveg,grel,y=0.5)
o.centroid # printing the matrix
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.