examples/tm_sf.R

data(World)

World$geometry[World$continent == "Africa"] <- 
  sf::st_centroid(World$geometry[World$continent == "Africa"])
World$geometry[World$continent == "South America"] <- 
  sf::st_cast(World$geometry[World$continent == "South America"], 
    "MULTILINESTRING", group_or_split = FALSE)

tm_shape(World) + 
	tm_sf()
mtennekes/tmap documentation built on Aug. 31, 2022, 7:49 p.m.