mtgcomponents: Components of upper scale of a vertex

View source: R/mtgcomponents.R

mtgcomponentsR Documentation

Components of upper scale of a vertex

Description

For a vertex in an object of class foldermtg, computes its decomposition into vertices of an upper scale.

Usage

mtgcomponents(x, vertex, scale)

Arguments

x

an object of class foldermtg.

vertex

character. The identifier of a vertex. These identifiers are the rownames of the data frame x$topology.

scale

integer. The scale of the components of vertex which will be returned.

Details

If vertex is a vertex of scale i, then scale (the scale of the returned components of vertex) must be higher than i. For example, if vertex is a vertex of scale 2, then scale > 2, for instance scale = 3. The returned components are then vertices of scale 3 which have a decomposition relationship with vertex.

Value

A character vector, containing the idendifiers of the components of vertex.

If there is no component, then the returned vector is empty.

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.

mtgorder, mtgrank.

Examples

mtgfile <- system.file("extdata/plant1.mtg", package = "dad")
xmtg <- read.mtg(mtgfile)

# Vertex of class "P" (plant, of scale 1), components of class 2 (axes: "A")
mtgcomponents(xmtg, vertex = "v01", scale = 2)

# Vertex of class "P" (plant, of scale 1), components of class 3 ("O", "M" and "I")
mtgcomponents(xmtg, vertex = "v01", scale = 3)

# Vertex of class "A" (stem, of scale 2), components of class 3 ("O", "M" and "I")
mtgcomponents(xmtg, vertex = "v12", scale = 3)

dad documentation built on Aug. 30, 2023, 5:06 p.m.