Creates an object of class
folderh from an object of class
## S3 method for class 'foldermtg' as.folderh(x, classes)
object of class
character vector. Codes of the vertex classes in the returned folderh.
These codes are the names of the elements (data frames) of
These codes must be distinct, and the corresponding classes must have distinct scales (see
These codes, except the one with the highest scale, are the keys of the returned folderh.
This function uses
An object of class
folderh. Its elements are the data frames of
x containing the features on vertices. Hence, each data frame matches with a class of vertex, and a scale. These data frames are in increasing order of the scale.
A column (factor) is added to the first data frame, containing the identifier of the vertex. Two columns are added to the second data frame:
the first one is a factor which gives, for each vertex, the name of the vertex of the first data frame which is its "parent",
and the second one is also a factor and contains the vertex's identifier.
And so on for the third and following data frames, if relevant.
The column containing the vertex identifiers is redundant with the row names; anyway, it is necessary for
The key of the relationship between the two first data frame is given by the first column of each of these data frames.
If there are more than two data frames, the key of the relationship between the
(n+1)-th data frames (
n > 1) is given by the second column of the
n$th data frame and the first column of the
(n+1)-th data frame.
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
read.mtg: reads a MTG file and creates an object of class "foldermtg".
folderh : object of class
mtgfile <- system.file("extdata/plant1.mtg", package = "dad") x <- read.mtg(mtgfile) # folderh containing the plant ("P") and the stems ("A") as.folderh(x, classes = c("P", "A")) # folderh containing the plant ("P"), axes ("A") and phytomers ("M") as.folderh(x, classes = c("P", "A", "M")) # folderh containing the plant ("P") and the phytomers ("M") as.folderh(x, classes = c("P", "M")) # folderh containing the axes and phytomers fhPM <- as.folderh(x, classes = c("A", "M")) # coerce this folderh into a folder, and compute statistics on this folder fPM <- as.folder(fhPM) mean(fPM)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.