Skip to content

Commit

Permalink
Merge branch 'sept-update-23' into update_new_nsu_cohort
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennit07 authored Aug 11, 2023
2 parents 495d3e3 + 04399a4 commit 8750124
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/get_existing_data_for_tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ get_existing_data_for_tests <- function(new_data, file_version = "episode") {
"anon_chi",
dplyr::intersect(slfhelper::ep_file_vars, tolower(names(new_data)))
)
if ("hscp" %in% names(new_data)) {
variable_names <- c("hscp2018", variable_names)
}
} else if (file_version == "individual") {
variable_names <- c(
"anon_chi",
Expand All @@ -45,6 +48,9 @@ get_existing_data_for_tests <- function(new_data, file_version = "episode") {
recids = recids,
columns = variable_names
))
if ("hscp2018" %in% variable_names) {
slf_data <- dplyr::rename(slf_data, "hscp" = "hscp2018")
}
} else {
slf_data <- suppressMessages(slfhelper::read_slf_individual(
year = year,
Expand Down

0 comments on commit 8750124

Please sign in to comment.