library(terra)
v <- vect(matrix(1:80, ncol = 2), crs = "EPSG:3857")
v$cat <- sample(LETTERS[1:4], size = nrow(v), replace = TRUE)
v
# Create tibble
as_tbl <- as_tibble(v, geom = "WKT")
as_tbl
# From tibble
newvect <- as_spatvector(as_tbl, geom = "geometry", crs = "EPSG:3857")
newvect
Run the code above in your browser using DataLab