calc_active_instruments: Calculate active instruments and number of daily tests

Description Usage Arguments Value Note Examples

View source: R/process.R

Description

Calculates for the number of instruments with at least 1 test in the prior 3 months (calculated for each instrument version as well as all instruments combined). Additionally calculates the number of respiratory panel (or other as supplied by target_PouchTitle) tests on a given date, as well as the number of all tests on that date.

Usage

1
2
3
4
5
calc_active_instruments(
  df,
  window = 91,
  target_PouchTitle = "Respiratory_Panel"
)

Arguments

df

dataframe of daily site level testing data. Columns must include "RunDataID", "SiteID", "date", "InstrumentSerialNumber", "InstrumentVersion", and "PouchTitle"

window

number of days to look back when calculating number of active of active instruments (default is 3 months (91 days))

target_PouchTitle

Name of the PouchTitle of interest

Value

Dataframe with columns "SiteID", "date", "daily_TUR_rp" (number of tests that day–for target_PouchTitle), "daily_TUR_all" (number of all tests for that day), "n_active" (number of active instruments in past 3 months (default is 3 months)), and "InstrumentVersion" (either the name of the instrument, or 'all', for all instrument versions combined)

Note

This function may take at least several minutes to run when large dataframe is used.

Examples

1
2

MartinHoldrege/turnr documentation built on May 16, 2020, 10:39 a.m.