MatH-class: Class MatH.

MatH-classR Documentation

Class MatH.

Description

Class MatH defines a matrix of distributionH objects

This function create a matrix of histogram data, i.e. a MatH object

Usage

## S4 method for signature 'MatH'
initialize(
  .Object,
  nrows = 1,
  ncols = 1,
  ListOfDist = NULL,
  names.rows = NULL,
  names.cols = NULL,
  by.row = FALSE
)

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

Arguments

.Object

the object type "MatH"

nrows

(optional, default=1)an integer, the number of rows.

ncols

(optional, default=1) an integer, the number of columns (aka variables).

ListOfDist

a vector or a list of distributionH objects

names.rows

a vector or list of strings with thenames of the rows

names.cols

a vector or list of strings with thenames of the columns (variables)

by.row

(optional, default=FALSE) a logical value, TRUE the matrix is row wise filled, FALSE the matrix is filled column wise.

x

(optional, default= an empty distributionH object) a list of distributionH objects

rownames

(optional, default=NULL) a list of strings containing the names of the rows.

varnames

(optional, default=NULL) a list of strings containing the names of the columns (aka variables).

Value

A matH object

Author(s)

Antonio Irpino

References

Irpino, A., Verde, R. (2015) Basic statistics for distributional symbolic variables: a new metric-based approach Advances in Data Analysis and Classification, DOI 10.1007/s11634-014-0176-4

Examples


## ---- create 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))

## create a MatH object filling it by columns
MyMAT <- new("MatH",
  nrows = 3, ncols = 2, ListOfDist = ListOfDist,
  names.rows = c("I1", "I2", "I3"), names.cols = c("Var1", "Var2"), by.row = FALSE
)

showClass("MatH")

# bulding an empty 10 by 4 matrix of histograms
MAT <- MatH(nrows = 10, ncols = 4)

HistDAWass documentation built on Sept. 26, 2022, 5:06 p.m.