SummarizeEventsTotalsBy: Summarize event counts and trial counts by groups.

Description Usage Arguments Value Author(s)

View source: R/02.ParepareDataWithinSites.R

Description

Summarize event counts and trial counts of binary outcome (coded 0 or 1) classified by a grouping variable. Intended for summarizing these counts by the binary treatment groups. When there are empty cells, the event counts and the total counts are both forced to be zeros.

Usage

1

Arguments

var

variable name of a binary variable (coded 0 or 1) in the data frame.

by

variable name of a categorical variable used as a grouping variable. This should usually be a factor if called in a stratified analysis to avoid differential lengths.

data

data frame containing these variables.

Value

data frame containing the events (event count) and the denom (trial count) information for each treatment group. When the data frame supplied is empty (0 rows), a single-row data frame filled with NA is returned.

Author(s)

Kazuki Yoshida


kaz-yos/distributed documentation built on May 27, 2019, 4:50 a.m.