subset bug
mdsumner opened this issue · 1 comments
mdsumner commented
When subsetting sf the IDs get screwed up
get_ids <- function(x) {list(sort(x$object$object_), sort(unique(x$triangle$object_)))}
get_ids(DEL(minimal_mesh)) ## no worries
## SCREWED
get_ids(DEL(minimal_mesh[2:1, ]))
[[1]]
[1] "I9EmCe" "j9pUsL"
[[2]]
[1] "HJFzNn" "x2Wxrg"
## SCREWED
get_ids(DEL(minimal_mesh[1, ]))
[[1]]
[1] "vGsllv"
[[2]]
[1] "LiFjI4"
mdsumner commented
PATH problem
get_ids_path <- function(x) {list(sort(x$object$object_), sort(unique(x$path$object_)))}
library(silicate)
get_ids_path(PATH(minimal_mesh))
get_ids_path(PATH(minimal_mesh[2:1, ]))