| add_outcomes | R Documentation |
add_death(), add_serious(), and add_fup() create outcome columns
in a vigibase dataset (typically demo), using data from the out
and followup tables.
These functions handle both in-memory and out-of-memory (Arrow) tables.
add_death(.data, out_data, col_name = "death")
add_serious(.data, out_data, col_name = "serious")
add_fup(.data, fup_data, col_name = "fup")
.data |
The dataset to update (usually |
out_data |
A data.frame containing the outcome data (usually |
col_name |
A character string. Name of the new column.
Defaults to |
fup_data |
A data.frame containing the follow-up data (usually
|
add_death() adds a column indicating whether the case
resulted in death (i.e., Seriousness == "1" in the out table).
Cases with no outcome data are coded NA.
Cases with outcome data but no death are coded 0.
Cases with death are coded 1.
add_serious() adds a column indicating whether the case
was serious (i.e., Serious == "Y" in the out table).
Cases with no outcome data are coded NA.
Cases with outcome data but not serious are coded 0.
Serious cases are coded 1.
add_fup() adds a column indicating whether the case has a
follow-up (i.e., UMCReportId appears in the followup table).
Cases with a follow-up are coded 1. Others are coded 0.
A dataset with the new outcome column.
add_drug(), add_adr()
demo <- demo_
out <- out_
demo <- add_death(demo, out_data = out)
demo <- add_serious(demo, out_data = out)
followup <- followup_
demo <- add_fup(demo, fup_data = followup)
desc_facvar(demo, c("death", "serious", "fup"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.