create_categories: Create categories of an output from an audit_measure

Description Usage Arguments

View source: R/audit_measure.R

Description

This function is a companion to create_output and is called by create_output_tbl. Where create_output creates a set of expressions for an audit_measure; create_categories outputs a string vector of the category type for that measure, allowing us to sort the aggregated data once produced. Unlike the other class methods, an extra parameter, category, must be supplied: this is the string category name which will be assigned to all output rows.

Usage

1
2
3
4
5
6
7
8
9
create_categories(x, numerator = NULL, output_type, category = "")

## S3 method for class 'audit_measure_continuous'
create_categories(x, numerator = NULL,
  output_type, category = "")

## S3 method for class 'audit_measure_discrete'
create_categories(x, numerator = NULL,
  output_type, category = "")

Arguments

x

An audit_measure object.

numerator

If the measure has more than one numerator and only one of the numerators is required, this should be set to the name of the numerator. If only one numerator is specified in the measure, or all numerators are to be used, then this should be omitted (or set to NULL).

output_type

Determines which sort of aggregated results are being requested from the data.

category

Name of the category as a string. This will be set as a blank string if unspecified.


md0u80c9/SSNAPStats documentation built on Feb. 11, 2020, 11:43 a.m.