Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. library(maps)
  2. sm <- map("world", ylim = c(-90, 0), plot = FALSE)
  3.  
  4. ## coords as matrix (including NA for R's old polygon default)
  5. m <- cbind(sm$x, sm$y)
  6.  
  7. library(rgdal)
  8. ## reproject the non-NAs
  9. m[!is.na(sm$x), ] <- project(m[!is.na(sm$x), ], "+proj=stere +lon_0=155 +lat_0=-35 +ellps=WGS84 +south")
  10. ## update the map object
  11. sm$x <- m[,1]
  12. sm$y <- m[,2]
  13. map(sm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement