fromTableToVectors {mri}R Documentation

From Contingency Table to Data Frame

Description

It covert a given contingency table to a data frame.

Usage

fromTableToVectors(cont.table)

Arguments

cont.table

contingency table (a data frame with rownames and columnames)

Value

A data frame with n rows and 2 columns. The first column corresponds to the rows of the contingency table while the second column corresponds to the columns of the contingency table.

Author(s)

Marjan Cugmas

Examples

data <- rbind(c(0, 10, 0, 0, 0),
                    c(0, 10, 0, 0, 0),
                    c(0, 0, 10, 0, 0),
                    c(0, 0,  0, 5, 5))
rownames(data) <- 1:4
colnames(data) <- 1:5
fromTableToVectors(cont.table = data)

[Package mri version 1.0.1 Index]