mtgrank {dad} | R Documentation |
Ranks of vertices in a decomposition
Description
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.
Usage
mtgrank(x, classe, parent.class = NULL, sibling.classes = NULL,
relative = FALSE, from = c("origin", "end"), rank.name = "Rank",
display = FALSE)
Arguments
x |
an object of class |
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 |
sibling.classes |
character vector. The classes of vertices appearing at the same scale as If omitted, only the vertices of class |
relative |
logical. If |
from |
character. It can be If |
rank.name |
character. Name of the rank column that is appended to |
display |
logical. If |
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.
Value
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
References
Pradal, C., Godin, C. and Cokelaer, T. (2023). MTG user guide
See Also
read.mtg
: reads a MTG file and builds an object of class foldermtg
.
Examples
mtgfile <- system.file("extdata/plant1.mtg", package = "dad")
xmtg <- read.mtg(mtgfile)
ymtg <- mtgrank(xmtg, "M")
print(ymtg)
mtgrank(xmtg, "M", display = TRUE)
mtgrank(xmtg, "M", parent.class = "A", display = TRUE)
mtgrank(xmtg, "M", parent.class = "A", sibling.classes = c("O", "I"), display = TRUE)
mtgrank(xmtg, "M", relative = TRUE, display = TRUE)
mtgrank(xmtg, "M", from = "origin", display = TRUE)
mtgrank(xmtg, "M", from = "end", display = TRUE)