Skip to content

Commit

Permalink
Fix #185
Browse files Browse the repository at this point in the history
  • Loading branch information
elipousson committed Apr 24, 2024
1 parent 69acc89 commit ca8d110
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Add `alias` argument to `arc_read()` allowing replacement or labelling of field names with alias values (#169)
- Add `pull_field_aliases()` utility function
- `arc_select()` now uses `arcgisutils::rbind_results()` for faster row-binding if `{collapse}`, `{data.table}`, `{vctrs}` are installed (#175)
- Preserve order of `fields` column names for `arc_select()` (fixes minor bug with `arc_read` handling of `col_names`) (#185)

# arcgislayers 0.2.0

Expand Down
4 changes: 2 additions & 2 deletions R/arc-select.R
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ collect_layer <- function(
# selected
if (rlang::is_named(res) && has_out_fields) {
out_fields <- c(out_fields, attr(res, "sf_column"))
res_nm <- names(res)
res <- res[, tolower(res_nm) %in% tolower(out_fields), drop = FALSE]
match_nm <- match(tolower(out_fields), tolower(names(res)))
res <- res[, match_nm[!is.na(match_nm)], drop = FALSE]
}

if (rlang::is_empty(res)) {
Expand Down

0 comments on commit ca8d110

Please sign in to comment.