plot.foldert: Plotting data of a foldert

View source: R/plot.foldert.R

plot.foldertR Documentation

Plotting data of a foldert

Description

Applies to an object of class foldert (called foldert below) that is a list. Plots the longitudinal evolution of a numeric variable for every individuals.

Usage

## S3 method for class 'foldert'
plot(x, which, na.inter = TRUE, type = "l", ylim = NULL, ylab = which,
                       main = "", ...)

Arguments

x

object of class foldert that is a list of data frames with the same column names, each of them corresponding to a time of observation.

which

character. Name of a column of the data frames of x. It gives the name of the variable to be plotted.

For each element x[[k]] of x, x[[k]] must be numeric. Otherwise, there is an error

na.inter

logical. If TRUE (default), for each individual, the missing values are deleted before plotting its evolution. If FALSE, the line corresponding to each individual is interrupted if there is a missing value, as for matplot.

type

character string (length 1 vector) or vector of 1-character strings (default "l") indicating the type of plot for each of the individuals followed among time, that is for each line of the data frames in the foldert. For further information about this argument, see matplot.

ylim

ranges of y axis. xlim is as in matplot. See details.

ylab

a label for the y axis. Default: the name of the plotted variable (which argument).

main

an overall title for the plot: see title.

...

optional arguments to plot methods.

Details

Internally, plot.foldert builds a matrix mdata containing the data of the variable given by which argument. The element mdata[ind, t] of this matrix is the value of the variable which for the individual ind: x[[t]][ind, which].

If the ylim argument is omitted, the range of y axis is given by range(mdata, na.rm = TRUE)*c(0, 1.2).

Author(s)

Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard

References

Boumaza, R., Yousfi, S., Demotes-Mainard, S. (2015). Interpreting the principal component analysis of multivariate density functions. Communications in Statistics - Theory and Methods, 44 (16), 3321-3339.

See Also

foldert: object of class foldert. as.foldert.data.frame: build an object of class foldert from a data frame. as.foldert.array: build an object of class foldert from a 3d-array.

Examples

data(floribundity)
ftflor <- foldert(floribundity, cols.select = "union", rows.select = "union")
plot(ftflor, which = "nflowers", ylab = "Number of flowers per plant",
     main = "Floribundity of rosebushes, 2010, Angers (France)")

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