Usage
mapPies(dF = ""
, nameX = "longitude"
, nameY = "latitude"
, nameZs=c(names(dF)[3],names(dF)[4])
, zColours=c(1:length(nameZs))
, ratio = 1
, addCatLegend = TRUE
, addSizeLegend = TRUE
, symbolSize = 1
, maxZVal=NA
, xlim=c(-160,160)
, ylim=c(-80,90)
, mapRegion = "world"
, borderCol = "grey"
, oceanCol=NA
, landCol=NA
, add=FALSE
, main=''
, ...)Arguments
dF
data frame or SpatialPolygonsDataFrame
nameX
name of column containing the X variable (longitude), not needed if dF is a SpatialPolygonsDataFrame
nameY
name of column containing the Y variable (latitude), not needed if dF is a SpatialPolygonsDataFrame
nameZs
name of columns containing numeric variables to determine pie sections
zColours
colours to apply to the pie section for each attribute column
ratio
the ratio of Y to N in the output map, set to 1 as default
addCatLegend
whether to add a legend for categories
addSizeLegend
whether to add a legend for symbol size
symbolSize
multiplier of default symbol size
maxZVal
the attribute value corresponding to the maximum symbol size,
this can be used to set the scaling the same between multiple plots
xlim
map extents c(west,east), can be overidden by mapRegion
ylim
map extents c(south,north), can be overidden by mapRegion
mapRegion
a country name from getMap()[['NAME']] or 'world','africa','oceania','eurasia','uk' sets map extents, overrides xlim,ylim
borderCol
the colour for country borders
oceanCol
a colour for the ocean
landCol
a colour to fill countries
add
whether to add the symbols to an existing map, TRUE/FALSE
...
any extra arguments to points()