Displaying 1 result from an estimated 1 matches for "ai_biotica".
2011 Apr 03
1
another question on shapefiles and geom_point in ggplot2
...nce the legend title is kind of
long, I broke it
down into three lines so you can see more plot area. I am cc'ing the other
groups so more people
use it if needed.
library(rgdal)
library(ggplot2)
library(sp)
library(maptools)
gpclibPermit()
manuel <- readOGR(dsn=".", layer="AI_BIOTICA_010411_CRTM05")
names(manuel);dim(manuel)
slotNames(manuel) # look at the slot names
# add the 'id' variable to the shapefile and use it to merge both files
manuel@data$id = rownames(manuel@data)
# convert shapefile to dataframe
manuel.df <- as.data.frame(manuel)
# fortify to...