File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11# version 1.0-13
22
3+ * ` select.sf() ` allows selecting the same column twice under different names; #1886
4+
35* ` st_as_sf.ppplist() ` is deprecated; #1926
46
57* ` st_cast() ` handles empty geometries; #1961
Original file line number Diff line number Diff line change @@ -162,7 +162,11 @@ select.sf <- function(.data, ...) {
162162 stop(" internal error: can't find sf column" ) # nocov
163163
164164 agr = st_agr(.data )
165- vars = names(.data )[setdiff(loc , sf_column_loc )]
165+ # vars = names(.data)[setdiff(loc, sf_column_loc)] # see #1886, change into:
166+ lloc = loc
167+ if (sf_column_loc %in% loc )
168+ lloc = lloc [loc != sf_column_loc ]
169+ vars = names(.data )[lloc ]
166170
167171 sf_column_loc_loc = match(sf_column_loc , loc )
168172 if (is.na(sf_column_loc_loc )) {
You can’t perform that action at this time.
0 commit comments