## ---- echo=FALSE, include=FALSE----------------------------------------------- library(knitr) opts_chunk$set(fig.width = 5, fig.height = 5, fig.cap='', collapse = TRUE) ## ----------------------------------------------------------------------------- library(geosphere) pol <- rbind(c(-120,-20), c(-80,5), c(0, -20), c(-40,-60), c(-120,-20)) areaPolygon(pol) perimeter(pol) ## ---- geo18------------------------------------------------------------------- plot(wrld, type='l', col='grey') a = randomCoordinates(500) points(a, col='blue', pch=20, cex=0.5) b = regularCoordinates(3) points(b, col='red', pch='x')