| flipTable | R Documentation |
Flip Table
flipTable(tab)
tab |
table object |
table object
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.