combine_mac_uds_encounters: Combine MAC and UDS Encounters

View source: R/combine_mac_and_uds_encounters.R

combine_mac_uds_encountersR Documentation

Combine MAC and UDS Encounters

Description

This function allows you to combine MAC and UDS encounters for a particular test where the encounters have been separated into different rows, but really occurred around the same time period. You can determine what range of days qualifies as a "single visit" using the day_range argument.

Usage

combine_mac_uds_encounters(
  dataframe,
  questions_to_combine,
  day_range = 30,
  DCDate = DCDate,
  PIDN = PIDN
)

Arguments

dataframe

dataframe object

questions_to_combine

select the variables that should be combined. This will be at least the item-level variables, and potentially your summary scores

day_range

range of days over which MAC and UDS visits can be considered the "same" visit; default of 30 days

DCDate

date identifier; defaults to DCDate variable

PIDN

person identifier; defaults to PIDN

Value

dataframe


NeuroShepherd/RankinLabTools documentation built on Sept. 23, 2022, 5:31 p.m.