Displaying 1 result from an estimated 1 matches for "diagnose_index".
2023 Dec 18
3
Function with large nested list
...ot; \\| ")[[1]]
ab_diagnose_dosering <- str_split(ab_data$`diagnose dosering`, pattern = " \\| ")[[1]]
ab_diagnose_duur <- str_split(ab_data$`diagnose duur`, pattern = " \\| ")[[1]]
# Find the index of the current diagnose in the ab_diagnoses list
diagnose_index <- match(diagnose, ab_diagnoses)
# Determine dosering and duur based on the diagnose_index
if (!is.na(diagnose_index)) {
dosering <- ifelse(ab_diagnose_dosering[diagnose_index] == "standaard", ab_data$dosering, ab_diagnose_dosering[diagnose_index])
duur <...