world <- sf::st_as_sf(rnaturalearthdata::coastline110)
w_pacific <- st_window(world, crs_Pacific)
ggplot2::ggplot(w_pacific) + ggplot2::geom_sf()
# bad - not run - dateline problem example
# ggplot2::ggplot(st_transform(world, crs_Pacific)) +
# ggplot2::geom_sf()
Run the code above in your browser using DataLab