fliptable: Flip Table

flipTableR Documentation

Flip Table

Description

Flip Table

Usage

flipTable(tab)

Arguments

tab

table object

Value

table object

Examples

set.seed(234)
require(magrittr)

sample <- dplyr::tibble("A" = stats::rnorm(100, 50, 4.5),
                       "B" = seq(1,300,3))

sample <- sample %>%
 dplyr::mutate(position = factor(ifelse(B %% 2 == 0, "Even", "Odd")))

fruits <- c("Kiwi", "Melon", "Peach")

treatment <- c("Chemical", "Organic", "Squish 'em")

died <- c("Dead", "Not dead")

sample$fruit <- sample(fruits, 100, replace = TRUE)
sample$pesticide <- sample(treatment, 100, replace = TRUE)
sample$death <- sample(died, 100, replace = TRUE)
tab <- table(sample$pesticide, sample$death, sample$fruit)

tab

flipTable(tab)

potato-nathan/epiAssist documentation built on April 15, 2022, 11:32 a.m.