desc_outcome | R Documentation |
Compute
outcome description over a set of adr and drugs.
desc_outcome(.data, drug_s = "drug1", adr_s = "adr1")
.data |
An |
drug_s |
A character vector, the drug column(s) |
adr_s |
A character vector, the adverse drug reaction column(s). |
You need an adr
data.table.
Be careful that you cannot directly filter adr
data.table on drugs!
You first have to add drug columns to adr
, with add_drug()
.
The function reports the worst outcome into consideration for a given case,
if many are reported.
Outcomes, from best to worst are:
Recovered/resolved
Recovering/resolving
Recovered/resolved with sequelae
Not recovered/not resolved
Fatal
Died- unrelated to reaction
Died- reaction may be contributory
See vignette("descriptive")
for more details.
A data.table with one row per drug-adr pair.
drug_s
and adr_s
, same as input
n_cas
, number of cases for each category
out_label
, the worst outcome for this drug-adr pair
adr_
, add_drug()
, add_adr()
adr_ <-
adr_ |>
add_drug(
d_code = ex_$d_groups_drecno,
drug_data = drug_
) |>
add_adr(
a_code = ex_$a_llt,
adr_data = adr_
)
desc_outcome(
adr_,
drug_s = "pd1",
adr_s = "a_colitis"
)
# you can vectorize over multiple adrs and drugs
desc_outcome(
adr_,
drug_s = c("pd1", "pdl1"),
adr_s = c("a_colitis", "a_pneumonitis")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.