Skip to content

Commit

Permalink
feat: #2125 add back exist_flag toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelos Zhu committed Oct 11, 2023
1 parent 729bef8 commit d8cfbf4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/derive_joined.R
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,14 @@ derive_vars_joined <- function(dataset,
}

# merge new variables to the input dataset and rename them
data %>%
data_final <- data %>%
derive_vars_merged(
dataset_add = data_return,
by_vars = exprs(!!!by_vars_left, !!tmp_obs_nr),
new_vars = add_suffix_to_vars(new_vars, vars = common_vars, suffix = ".join"),
missing_values = missing_values,
check_type = check_type,
exist_flag = exist_flag,
true_value = true_value,
false_value = false_value,
duplicate_msg = paste(
Expand All @@ -441,4 +442,9 @@ derive_vars_joined <- function(dataset,
)
) %>%
remove_tmp_vars()
if (is.null(exist_flag)) {
data_final <- data_final %>%
select(-starts_with("exist_"))
}
data_final
}

0 comments on commit d8cfbf4

Please sign in to comment.