Computes the rank of the vertices contained in an object of class foldermtg. The vertex sequences resulting from a decomposition of other vertices, the rank of the vertices making up the sequences are computed from the beginning of the sequence or from its end. These ranks can be absolute or relative.
For example: ranks of the phytomeres and inflorescences in each stem.
classe: character. The class of the vertices for which the ranks are computed.
parent.class: character. The class of the parent entities of those for which the ranks are computed. If omitted, the entities of scale maxscal - 1, where maxscal is the highest scale in x data.
sibling.classes: character vector. The classes of vertices appearing at the same scale as classe, which are used in the computing of the ranks.
If omitted, only the vertices of class classe are used to compute the ranks.
relative: logical. If TRUE, the relative ranks are computed, i.e. ranks from 0 to 1. Default: FALSE.
from: character. It can be "origin" (default) or "end".
If from = "origin", the ranks are computed from the origin to the end, i.e. from 1 to its maximum (from 0 to 1 if relative = TRUE). If from = "end", they are computed from the end to the origin, i.e. from the maximum to 1 (from 1 to 0 if relative = TRUE).
rank.name: character. Name of the rank column that is appended to x[[classe]]. The default is "Rank".
display: logical. If TRUE, the data frames of x corresponding to classes are displayed. Default: FALSE.
Details
If the branching orders of the entities given by classe, parent.class and, if relevant, sibling.classes are not contained in x, mtgrank() uses mtgorder to compute them. The ranks are appended to the data frames containing the vertices (one data frame per class) and the values of their corresponding features.
Returns
Returns an object of class foldermtg, that is a list of data frames.
Author(s)
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
See Also
read.mtg: reads a MTG file and builds an object of class foldermtg.
mtgorder.
References
Pradal, C., Godin, C. and Cokelaer, T. (2023). MTG user guide