fromTableToVectors: From Contingency Table to Data Frame

Description Usage Arguments Value Author(s) Examples

View source: R/fromTableToVectors.R

Description

It covert a given contingency table to a data frame.

Usage

1
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

1
2
3
4
5
6
7
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)

mri documentation built on May 1, 2019, 10:21 p.m.

Related to fromTableToVectors in mri...