Skip to contents

Produces measures used within testing extracts. Computes various measures for the variables specified.

Usage

calculate_measures(
  data,
  vars = NULL,
  measure = c("sum", "all", "min-max"),
  group_by = NULL
)

Arguments

data

A processed dataframe containing a summary of the mean and sum of variables.

vars

Specify variables you want to test. This will match this e.g c(beddays, cost, yearstay). Default as NULL for summarising everything.

measure

The measure you want to apply to variables

group_by

Default as NULL for grouping variables. Specify variables for grouping e.g recid for episode file testing.

Value

a tibble with a summary