Skip to content

Commit

Permalink
Selectively clean up variables after
Browse files Browse the repository at this point in the history
  • Loading branch information
Moohan committed Jul 20, 2023
1 parent e4c1465 commit e110cdf
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions R/create_individual_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -760,14 +760,12 @@ clean_individual_file <- function(individual_file, year) {
cli::cli_alert_info("Clean individual file function started at {Sys.time()}")

individual_file %>%
dplyr::select(
!c(
"ch_no_cost",
"no_paid_items",
"total_no_dn_contacts",
"cost_total_net_inc_dnas"
)
) %>%
dplyr::select(dplyr::any_of(!c(
"ch_no_cost",
"no_paid_items",
"total_no_dn_contacts",
"cost_total_net_inc_dnas"
))) %>%
clean_up_gender() %>%
dplyr::mutate(age = compute_mid_year_age(year, .data$dob))
}
Expand Down

0 comments on commit e110cdf

Please sign in to comment.