R code for maps