check_and_fix_contin_table: Verifying and correcting the input I by J contingency table

View source: R/check_and_fix_contin_table.R

check_and_fix_contin_tableR Documentation

Verifying and correcting the input I by J contingency table

Description

Verify and correct the input I by J contingency table to ensure it is properly formatted as a data matrix with row (adverse event) and column (drug) names.

Usage

check_and_fix_contin_table(contin_table)

Arguments

contin_table

A data matrix or a data frame of an I by J contingency table with or without prespecified row and column names.

Value

A data matrix of an I by J contingency table with row and column names.

Examples

# Create a 6 by 4 data matrix
set.seed(42)
dat_mat <- matrix(rpois(6 * 4, 20), nrow = 6)
dat_mat

# Check the format of the data matrix and assign row and column names
contin_table <- check_and_fix_contin_table(dat_mat)
contin_table

MDDC documentation built on April 11, 2025, 5:45 p.m.