mat_to_xy: Convert a 2x2 table into X,Y data frame format

Description Usage Arguments Value Examples

View source: R/internal.R

Description

This is a helper function since FragilityTools uses X,Y data frames by default, but uses 2x2 tables when possible for improved computational efficiency.

Usage

1
mat_to_xy(mat, event.col = 1)

Arguments

mat

2x2 numeric matrix

event.col

either 1 or 2, specifying which column has events, by default 1

Value

list containing two one-column data frames X and Y

Examples

1
FragilityTools:::mat_to_xy(matrix(1:4, nrow = 2))

brb225/FragilityTools documentation built on Jan. 21, 2022, 1:26 a.m.