Set unique primary drug identifiers in the table
Source:R/standardize_MAE.R
set_unique_drug_names_dt.Rd
This function sets the primary drug field(s) in data.frame-like object to be unique
by appending the secondary drug field(s) in parentheses for duplicates.
By default DrugName
, DrugName_2
, and DrugName_3
are primary drug fields,
while Gnumber
, Gnumber_2
, and Gnumber_3
are their respective secondary drug fields.
Usage
set_unique_drug_names_dt(
dt,
primary_names = unlist(get_env_identifiers()[(c("drug_name", "drug_name2",
"drug_name3"))]),
secondary_names = unlist(get_env_identifiers()[(c("drug", "drug2", "drug3"))]),
sep = " "
)