Skip to content

Commit

Permalink
Style code
Browse files Browse the repository at this point in the history
  • Loading branch information
Moohan authored and github-actions[bot] committed Jul 19, 2023
1 parent c66146b commit 37471f0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 35 deletions.
3 changes: 1 addition & 2 deletions R/add_nsu_cohort.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
add_nsu_cohort <- function(
data,
year,
nsu_cohort = read_file(get_nsu_path(year))
) {
nsu_cohort = read_file(get_nsu_path(year))) {
year_param <- year

if (!check_year_valid(year, "NSU")) {
Expand Down
15 changes: 6 additions & 9 deletions R/fill_geographies.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ fill_geographies <- function(
data,
slf_pc_lookup = read_file(get_slf_postcode_path()),
slf_gpprac_lookup = read_file(
get_slf_gpprac_path(),
col_select = c("gpprac", "cluster", "hbpraccode")
)
) {
get_slf_gpprac_path(),
col_select = c("gpprac", "cluster", "hbpraccode")
)) {
check_variables_exist(data, c(
"chi",
"postcode",
Expand Down Expand Up @@ -102,8 +101,7 @@ make_gpprac_lookup <- function(data) {

fill_postcode_geogs <- function(
data,
slf_pc_lookup
) {
slf_pc_lookup) {
filled_postcodes <- dplyr::left_join(
data,
make_postcode_lookup(data),
Expand Down Expand Up @@ -151,9 +149,8 @@ fill_postcode_geogs <- function(

fill_gpprac_geographies <- function(
data,
slf_gpprac_lookup
) {
filled_gpprac <- dplyr::left_join(
slf_gpprac_lookup) {
filled_gpprac <- dplyr::left_join(
data,
make_gpprac_lookup(data),
by = "chi"
Expand Down
39 changes: 19 additions & 20 deletions R/get_source_extract_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,25 @@
get_source_extract_path <- function(
year,
type = c(
"Acute",
"AE",
"AT",
"CH",
"Client",
"CMH",
"DD",
"Deaths",
"DN",
"GPOoH",
"HC",
"Homelessness",
"Maternity",
"MH",
"Outpatients",
"PIS",
"SDS"
),
...
) {
"Acute",
"AE",
"AT",
"CH",
"Client",
"CMH",
"DD",
"Deaths",
"DN",
"GPOoH",
"HC",
"Homelessness",
"Maternity",
"MH",
"Outpatients",
"PIS",
"SDS"
),
...) {
type <- match.arg(type)

if (!check_year_valid(year, type)) {
Expand Down
3 changes: 1 addition & 2 deletions R/match_on_ltcs.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
match_on_ltcs <- function(
data,
year,
ltc_data = read_file(get_ltcs_path(year))
) {
ltc_data = read_file(get_ltcs_path(year))) {
# Match on LTC lookup
matched <- dplyr::left_join(
data,
Expand Down
3 changes: 1 addition & 2 deletions R/run_episode_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,7 @@ join_cohort_lookups <- function(
service_use_cohort = read_file(
get_service_use_cohorts_path(year, update),
col_select = c("chi", "service_use_cohort")
)
) {
)) {
join_cohort_lookups <- data %>%
dplyr::left_join(
demographic_cohort,
Expand Down

0 comments on commit 37471f0

Please sign in to comment.