Skip to content

Commit 6bb2868

Browse files
committed
Fix filtering with quoted variable names
1 parent d0ceba3 commit 6bb2868

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

R/geography.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,12 @@ generate_ll_from_utm <- function(df,
428428
dplyr::select(`_UTMJOINCOL`, {{EastingCol}}, {{NorthingCol}}, {{ZoneCol}}, {{DatumCol}})
429429

430430
withr::with_envvar(c("PROJ_LIB" = ""), { # This is a fix for the proj library bug in R (see pinned post "sf::st_read() of geojson not getting CRS" in IMData General Discussion).
431-
# filter out rows that are missing UTM, zone, or datum
432-
coord_df <- coord_df %>%
433-
dplyr::filter(!is.na({{EastingCol}}) &
434-
!is.na({{NorthingCol}}) &
435-
!is.na({{ZoneCol}}) &
436-
!is.na({{DatumCol}}))
431+
coord_df <- coord_df %>%
432+
dplyr::filter(!is.na(!!rlang::ensym(EastingCol)) &
433+
!is.na(!!rlang::ensym(NorthingCol)) &
434+
!is.na(!!rlang::ensym(ZoneCol)) &
435+
!is.na(!!rlang::ensym(DatumCol)))
436+
437437

438438
na_row_count <- nrow(df) - nrow(coord_df)
439439
if (na_row_count > 0) {

0 commit comments

Comments
 (0)