View source: R/derive_vars_merged_vaccine.R
derive_vars_merged_vaccine | R Documentation |
Add new variables to the input dataset based on variables from another dataset.
The variables to be added to the output dataset will be based on input variables
passed on ex_vars
argument.
derive_vars_merged_vaccine(
dataset,
dataset_ex,
by_vars_sys,
by_vars_adms,
ex_vars
)
dataset |
Input dataset which should have been combined with the supplementary(if exists). The variables specified by the |
dataset_ex |
The variables specified by the |
by_vars_sys |
Grouping variables for systemic events. |
by_vars_adms |
Grouping variables for administration site events. |
ex_vars |
Variables to be added to the output dataset from EX dataset |
The input dataset will be merged with EX
dataset for "ADMINISTRATION SITE" and
"SYSTEMIC" categories separately and these datasets will be bound together as
the final output dataset.
This function is intended to add only EX
variables to the input dataset and user
is expected to handle if any pre-processing is required.
Only the variables passed to the ex_vars
will be added in the output dataset
If the input dataset has multiple vaccination for a subject at same visit
then this function will not merge ex dataset and will return the dataset
.
The dataset with variables added from the EX dataset.
Vikram S
Other der_var:
derive_var_aval_adis()
,
derive_vars_crit()
,
derive_vars_event_flag()
,
derive_vars_max_flag()
,
derive_vars_params()
,
derive_vars_vaxdt()
library(tibble)
library(admiral)
library(dplyr)
library(pharmaversesdtm)
derive_vars_merged_vaccine(
dataset = face_vaccine,
dataset_ex = ex_vaccine,
by_vars_sys = exprs(USUBJID, FATPTREF = EXLNKGRP),
by_vars_adms = exprs(USUBJID, FATPTREF = EXLNKGRP, FALOC = EXLOC, FALAT = EXLAT),
ex_vars = exprs(EXTRT, EXDOSE, EXDOSU, EXSTDTC, EXENDTC)
) %>%
select(USUBJID, FATPTREF, FALOC, FALAT, EXTRT, EXDOSE, EXDOSU, EXSTDTC, EXENDTC) %>%
head(10)
derive_vars_merged_vaccine(
dataset = face_vaccine,
dataset_ex = ex_vaccine,
by_vars_sys = exprs(USUBJID, FATPTREF = EXLNKGRP),
by_vars_adms = exprs(USUBJID, FATPTREF = EXLNKGRP, FALOC = EXLOC, FALAT = EXLAT),
ex_vars = exprs(EXTRT, EXDOSE, EXDOSU, EXSTDTC, EXENDTC)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.