baseDaysComparison: X Days Comparison

View source: R/baseDaysComparison.R

baseDaysComparisonR Documentation

X Days Comparison

Description

Uses the output from 'rollSummaryXDays()' and the formatted measure table to create comparisons. This is generalized so that it can be used for the 7 Day Comparison section and for the Weekly Data Snapshot section.

Usage

baseDaysComparison(rollSumData, measureTable, days = 7, lag = days)

Arguments

rollSumData

An output from 'rollSummaryXDays()'.

measureTable

A formatted table containing the columns measureName and upGood. measureName is the name of the columns you are wanting to create the comparison measure for with the number of days replaced by ##. upGood is a logical for each measureName on whether an increasing value is good or bad. This is used the create the KPI values.

days

The number of days the rollSumData was calculated over.

lag

The multiplier for the number of days to lag over. The default is the value set to days. This is added in for generalization for using pre-thinned data like in the Weekly Data Snapshot summaries.


MARC-KC/Covid19MARCData documentation built on April 7, 2022, 11:43 a.m.