# NOT RUN {
library(sf)
pts1 <- rbind(c(1, 2), c(3, 2))
comp1 <- component_from_sfg(st_multipoint(pts1), 0.2)
comp2 <- component_from_sfg(st_point(c(1, 5)), 0.8)
# appending these components into an empty pgeometry object
pp <- create_empty_pgeometry("PLATEAUPOINT")
pp <- spa_add_component(pp, list(comp1, comp2))
pp
# }
Run the code above in your browser using DataLab