Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary code from get_anon_chi #759

Merged
merged 2 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ keytime
keytimex
kis
lgl
kis
los
ltc
ltcs
Expand Down
6 changes: 1 addition & 5 deletions R/run_episode_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,7 @@
load_ep_file_vars(year)

if (anon_chi_out) {
# TODO When slfhelper is updated remove the unnecessary code
episode_file <- episode_file %>%
tidyr::replace_na(list(chi = "")) %>%
slfhelper::get_anon_chi() %>%
dplyr::mutate(anon_chi = dplyr::na_if(.data$anon_chi, ""))
episode_file <- slfhelper::get_anon_chi(episode_file)
}

if (write_to_disk) {
Expand Down Expand Up @@ -208,12 +204,12 @@
fill_missing_cij_markers <- function(data) {
fixable_data <- data %>%
dplyr::filter(
.data[["recid"]] %in% c("01B", "04B", "GLS", "02B", "DD") & !is.na(.data[["chi"]])

Check warning on line 207 in R/run_episode_file.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/run_episode_file.R,line=207,col=81,[line_length_linter] Lines should not be more than 80 characters.
)

non_fixable_data <- data %>%
dplyr::filter(
!(.data[["recid"]] %in% c("01B", "04B", "GLS", "02B", "DD")) | is.na(.data[["chi"]])

Check warning on line 212 in R/run_episode_file.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/run_episode_file.R,line=212,col=81,[line_length_linter] Lines should not be more than 80 characters.
)

fixed_data <- fixable_data %>%
Expand Down Expand Up @@ -346,8 +342,8 @@
})

# This 'blocks' the code until they have both finished executing
value_demographic <- future::value(future_demographic)

Check warning on line 345 in R/run_episode_file.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/run_episode_file.R,line=345,col=3,[object_usage_linter] local variable 'value_demographic' assigned but may not be used
value_service_use <- future::value(future_service_use)

Check warning on line 346 in R/run_episode_file.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/run_episode_file.R,line=346,col=3,[object_usage_linter] local variable 'value_service_use' assigned but may not be used

return(data)
}
Expand Down
Loading