File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 4
4
- Add ` alias ` argument to ` arc_read() ` allowing replacement or labelling of field names with alias values (#169 )
5
5
- Add ` pull_field_aliases() ` utility function
6
6
- ` arc_select() ` now uses ` arcgisutils::rbind_results() ` for faster row-binding if ` {collapse} ` , ` {data.table} ` , ` {vctrs} ` are installed (#175 )
7
+ - Preserve order of ` fields ` column names for ` arc_select() ` (fixes minor bug with ` arc_read ` handling of ` col_names ` ) (#185 )
7
8
8
9
# arcgislayers 0.2.0
9
10
Original file line number Diff line number Diff line change @@ -248,8 +248,8 @@ collect_layer <- function(
248
248
# selected
249
249
if (rlang :: is_named(res ) && has_out_fields ) {
250
250
out_fields <- c(out_fields , attr(res , " sf_column" ))
251
- res_nm <- names(res )
252
- res <- res [, tolower( res_nm ) %in% tolower( out_fields ) , drop = FALSE ]
251
+ match_nm <- match(tolower( out_fields ), tolower( names(res )) )
252
+ res <- res [, match_nm [ ! is.na( match_nm )] , drop = FALSE ]
253
253
}
254
254
255
255
if (rlang :: is_empty(res )) {
You can’t perform that action at this time.
0 commit comments