MM (version 1.6-5)

gunter: Convert from multiple multivariate observations to tabular form

Description

Convert from a matrix with rows corresponding to multivariate observations, to a tabular form listing every possible combination together with the number of times that combination was observed.

Usage

gunter(obs)
# S3 method for gunter
print(x, ...)

Arguments

obs

Argument. If a matrix, interpret each row as a multivariate observation (so the rowsums are constant). If an object of class MB, interpret appropriately; if an Oarray, coerce to an MB object

x

Object of class gunter to be printed by the print method

...

Further arguments, currently ignored

Value

For matrices and data frames, function gunter() returns an object of class gunter: a list of two elments, the first being a matrix (‘obs’) with rows being possible observations, and the second (‘d’) a vector with one entry for each row of matrix obs.

For MB objects and Oarray objects, function gunter() returns an object of class gunter_MB.

The print method returns its argument, invisibly, after printing it coerced to a list.

Examples

Run this code
# NOT RUN {
data(wilson)
gunter(non_met)

data(danaher)
gunter(danaher)  # object of class gunter_MB

# }

Run the code above in your browser using DataLab