utils: Utilities for tallied data frames

Description Usage Arguments Value

Description

Useful when piping a grouped data frame to dplyr::tally() and then converting that into a contingency table before piping it into beta_binom, or flipping rows and columns in between those steps. Works for data frames grouped by a single variable only, to create tables with more than 2 dimensions, use xtabs.

Usage

1
2
3
4
5

Arguments

df

A data.frame where the first column is the group column and the rest are counts of outcomes.

x

A 2-by-2 table produced by make_table(), table(), or xtabs().

Value

A 2-by-2 table.


bearloga/BCDA documentation built on Feb. 8, 2021, 3:43 p.m.