MatH-class: Matrices of histograms: the MatH class

MatH-classR Documentation

Matrices of histograms: the MatH class

Description

The MatH class describes a matrix of histograms: each cell contains a distributionH object, rows are the individuals and columns the (histogram-valued) variables.

Usage

MatH(
  x = NULL,
  nrows = 1,
  ncols = 1,
  rownames = NULL,
  varnames = NULL,
  by.row = FALSE
)

Arguments

nrows, ncols

Integers, the number of rows (individuals) and of columns (variables). Default 1.

by.row

A logical value (default FALSE): if TRUE the matrix is filled by rows, otherwise by columns.

x

A list of distributionH objects (default NULL, an empty matrix).

rownames, varnames

Character vectors (or lists of strings), the names of the rows and of the columns (variables). Default NULL.

Value

MatH() returns a MatH object.

Slots

M

A matrix of mode list, each cell containing a distributionH object.

Creating objects

Objects are created with MatH() or with new("MatH", nrows, ncols, ListOfDist, names.rows, names.cols, by.row), where ListOfDist is a list of distributionH objects and names.rows, names.cols are the names of rows and columns.

References

Irpino, A., Verde, R. (2015) Basic statistics for distributional symbolic variables: a new metric-based approach, Advances in Data Analysis and Classification, 9(2), 143-175. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11634-014-0176-4")}

See Also

get.MatH.main.info, plot,MatH-method, WH.vec.mean, WH.var.covar.

Examples

## a list of six distributionH objects
ListOfDist <- vector("list", 6)
ListOfDist[[1]] <- distributionH(c(1, 2, 3), c(0, 0.4, 1))
ListOfDist[[2]] <- distributionH(c(7, 8, 10, 15), c(0, 0.2, 0.7, 1))
ListOfDist[[3]] <- distributionH(c(9, 11, 20), c(0, 0.5, 1))
ListOfDist[[4]] <- distributionH(c(2, 5, 8), c(0, 0.3, 1))
ListOfDist[[5]] <- distributionH(c(8, 10, 15), c(0, 0.75, 1))
ListOfDist[[6]] <- distributionH(c(20, 22, 24), c(0, 0.12, 1))
## a 3 x 2 MatH filled by columns
MyMAT <- MatH(
  x = ListOfDist, nrows = 3, ncols = 2,
  rownames = c("I1", "I2", "I3"), varnames = c("Var1", "Var2")
)
MyMAT
## an empty 10 x 4 matrix of histograms
MAT <- MatH(nrows = 10, ncols = 4)

HistDAWass documentation built on Oct. 19, 2026, 1:06 a.m.