# NOT RUN {
library(rgdal)
library(sp)
data(isis)
sites <- isis$sites
coordinates(sites) <- ~ LONWGS84 + LATWGS84
proj4string(sites) <- "+proj=longlat +datum=WGS84"
# }
# NOT RUN {
## obtain country borders:
library(maps)
country.m = map('world', plot=FALSE, fill=TRUE)
IDs <- sapply(strsplit(country.m$names, ":"), function(x) x[1])
require(maptools)
country <- as(map2SpatialPolygons(country.m, IDs=IDs), "SpatialLines")
proj4string(country) = "+proj=longlat +datum=WGS84"
## overlay and plot points and maps:
plot(country, col="darkgrey")
points(sites, pch=21, bg="red", cex=.6, col="black")
# }
Run the code above in your browser using DataLab