hypertidy/silicate

explore the tibble drop class thing

mdsumner opened this issue · 1 comments

Just notes, next step was look at the class(c(sfc, list)) thing

x <- silicate::minimal_mesh
class(x$geom)
class(x) <- c("sf", "tbl_df", "tbl", "data.frame")

x2 <-  sf::st_as_sf(tibble::as_tibble(x))
class(x2[[attr(x, "sf_column")]]) <- c( "sfc_MULTIPOLYGON", "sfc")
base:::all.equal.default(x,x2)

class(x[1, ])
class(x[1, ][[attr(x, "sf_column")]])

class(subset(x, a == 1))
class(subset(x, a == 1)[[attr(x, "sf_column")]])

class(dplyr::filter(x, a == 1))
class(dplyr::filter(x, a == 1)[[attr(x, "sf_column")]])


it's covered