pfDotMap(TR, tarAge, hw, binhw = 0.5 * mean(diff(tarAge)), fig.base.name = NULL, base.map = "coasts", grd.res = 5, grd.ext = c(-180, 180, -90, 90), grd.lonlat = NULL, proj4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs", n.boot = 1000, cx.minsize = 0.3, cx.mult = 1)pfTransformNULL
(default) causes figures to be plotted to the current device in sequence.'coasts' or 'countries' to
choose which base map (from required library 'rworldmap') to be
plotted as the base map for all plots. Could easily be modified to accept
any SpatialPolygons object.grd.res is a single number, the grid will be defined with equal
lon/lat resolution; a two-element vector (lon,lat) can also be supplied for
unequal resolution. grd.ext is specified as a vector of the form
c(min-lon,max-lon,min-lat,max-lat).fig.base.name. In addition, a named list of useful objects is
returned:SpatialPointsDataFrame-class object containing all the
grid-level statistics produced and plotted (mean influx value, bootstrap
confidence interval, and number of sites per grid cell). SpatialPointsDataFrame-class object representing the
number of grid cells influenced by each site. update.trellis
function, and plotted or used in layouts as any other trellis graphics can.
Results will be plotted on a regular lon/lat grid. To determine which sites contribute to each grid cell value, the code searches within a specified great circle distance (i.e. on the surface of the globe) around each grid cell center. To avoid missing any sites, the distance is set equal to the greatest distance from a grid cell center to its most distant corner, which occurs at the equator where grid cells are largest. This conservative approach will result in many sites falling within multiple grid boxes. At all latitudes, the defined radii will overlap near the edges of the grid boxes. At higher latitudes, the lon/lat grid cells are physically much smaller, so overlap will be considerably greater. There are alternatives, like using a grid that is irregular in terms of lon/laton, or changing the area of grid cells depending on latitude. But all have their tradeoffs, and this one is simple.
Current version produces plots of mean CHAR, number of sites per grid cell, and number of grid cells contributed to by each site (due to overlapping radii described above). The mean plot additionally shows points in two sizes, representing those mean values whose 95"%" confidence intervals do (small dots) or do not (large dots) contain zero. Finally, a time series is plotted in each figure with the current time bin highlighted.
## Not run:
# ## Composite charcoal record for North America:
# ID=pfSiteSel(id_region==c("WNA0"), l12==1 & long<(-130))
# plot(ID)
#
# ## Transform data
# res3=pfTransform(ID,method=c("MinMax","Box-Cox","Z-Score"),BasePeriod=c(200,4000))
#
# ## Plot maps for 1000-yr bins spanning 3-0 kBP
# # dev.new(width=10,height=10) # A big plot area helps.
# dotmap = pfDotMap( TR=res3, tarAge=seq(0,2000,1000), hw=500, grd.ext=c(-170,-80,40,80),
# cx.minsize=2,cx.mult=3)
# summary(dotmap)
#
# # Plot the mean map from the first time bin
# # newmap = update(dotmap$plots[[1]]$mean, main="A relabeled map")
# # newmap
# ## End(Not run)
Run the code above in your browser using DataLab