I use to be able to run this script without any problem, but now the fortify {ggplot2} command gives me an error message. Any hint of what might be the problem would be great! I used the fortify command to be able to geom_map the shapefile using ggplot2.
Below is my script and link for downloading the data.
####################################################### ####################################################### rm(list = ls(all = TRUE))#clear workspace getwd() #upload packages library(maps) library(mapdata) library(gridExtra) library(rgdal) library(rgeos) library(ggplot2) library(sp) library(maptools) gpclibPermit() #setwd(".../FAO") FAO data are major fishing area divisions > FAO names(FAO);dim(FAO) [1] "zone" [1] 19 1 > str(FAO,max.level=2) Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots ..@ data :'data.frame': 19 obs. of 1 variable: ..@ polygons :List of 19 ..@ plotOrder : int [1:19] 18 2 17 4 12 3 13 11 5 6 ... ..@ bbox : num [1:2, 1:2] -180 -85.5 180 90 .. ..- attr(*, "dimnames")=List of 2 ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots > plot(FAO)

FAO@data$id = rownames(FAO@data) FAO.df FAO_fort
Here's a link to download the data FAO data. Thank you!