calculate.summary.dt: Summarise a data.table

View source: R/plot.R

calculate.summary.dtR Documentation

Summarise a data.table

Description

Plots a bar plot using ggplot2. Input to this function must be summarised, it will not count for you.

Usage

calculate.summary.dt(
  input.dt,
  daoh.col.name = "daoh",
  by.group = NULL,
  weight.col.name = NULL
)

Arguments

daoh.col.name

Name of the DAOH column

by.group

Name of the stratifying group column, none if NA (e.g., an intervention) (Default: NULL)

weight.col.name

Name of a column to weight observations by, for risk-adjustment purposes. If provided, it will be summed instead of the number of instance (Default: NULL)

input.summary.dt

A data.table with DAOH summarised by value (and by some other group if desired).

Value

data.table with totals and proportions per group of DAOH values


mattmoo/daohtools documentation built on Feb. 5, 2023, 5:38 a.m.