Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(maps)
- sm <- map("world", ylim = c(-90, 0), plot = FALSE)
- ## coords as matrix (including NA for R's old polygon default)
- m <- cbind(sm$x, sm$y)
- library(rgdal)
- ## reproject the non-NAs
- m[!is.na(sm$x), ] <- project(m[!is.na(sm$x), ], "+proj=stere +lon_0=155 +lat_0=-35 +ellps=WGS84 +south")
- ## update the map object
- sm$x <- m[,1]
- sm$y <- m[,2]
- map(sm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement