
Add the maximum number of ingredients to which an individual is simultaneously exposed within a specified window
Source:R/polypharmacy.R
addPolypharmacyCount.RdArguments
- x
A
cdm_tablecontaining a person identifier column namedperson_idorsubject_id.- indexDate
A character string naming the
Datecolumn inxthat defines the index date.- window
A numeric vector of length two,
c(min, max), defining the window forpolypharmacyin days relative toindexDate. Use-InforInffor an unbounded lower or upper limit.- overlap
Logical; if
TRUE, count drug eras that overlap in time. IfFALSE, count drug eras that occur within the window without requiring them to overlap one another.- categories
A named list of numeric vectors, each containing the lower and upper bounds of a score interval. An additional column with the suffix
_categoriesis added. Intervals are evaluated in the order supplied, and missing scores are labelledmissing.- nameStyle
A character string specifying the name of the new column.
- name
A character string specifying the name of the output table. If
NULL, a temporary table is created.
Value
The table x with a new column containing the maximum number of
simultaneous ingredients in the window of interest.
Details
The function was renamed to addPolypharmacy()