Skip to content

Commit

Permalink
Fix for col selecting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nic-Chr committed Jul 25, 2024
1 parent cb2ae09 commit 863c67a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/get_simd_postcode.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ get_simd_postcode <- function(

return(read_file(
simd_postcode_path,
col_select = col_select,
col_select = {{ col_select }},
as_data_frame = as_data_frame
))
}
2 changes: 1 addition & 1 deletion R/get_spd.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ get_spd <- function(

return(read_file(
spd_path,
col_select = col_select,
col_select = {{ col_select }},
as_data_frame = as_data_frame
))
}
2 changes: 1 addition & 1 deletion R/read_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ read_file <- function(path, col_select = NULL, as_data_frame = TRUE, ...) {
))
}

if ((!missing(col_select) || !missing(as_data_frame)) && ext != "parquet") {
if ((!rlang::quo_is_missing(rlang::enquo(col_select)) || !missing(as_data_frame)) && ext != "parquet") {

Check warning on line 32 in R/read_file.R

View workflow job for this annotation

GitHub Actions / lint

file=R/read_file.R,line=32,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 106 characters.
cli::cli_abort(c(
"x" = "{.arg col_select} and/or {.arg as_data_frame} must only be used
when reading a {.field .parquet} file."
Expand Down

0 comments on commit 863c67a

Please sign in to comment.