Description Usage Arguments Details Value Examples
View source: R/plot_functions.R
Take a lgcpRealPlot object and aggregates the output to a larger geography specified by a spatialPolygons
object.
1 | aggregator(obj, aggpoly, osm = FALSE, verbose = TRUE)
|
obj |
An lgcpRealPlot produced by |
aggpoly |
A |
osm |
A logical value indicating whether to overlay the plot on an OpenStreetMap map |
verbose |
Logical value indicating whether to show progress bar |
This function provides a way of producing aggregated model output for larger geographies. The model fitting takes place on a fine regular lattice, this function provides a way to aggregate this to non-regular polygons such as administrative or political boundaries.
An lgcpRealPlot object comprising a list of two ggplot objects.
1 2 3 4 5 6 7 8 9 10 11 12 | data(dat,square,square_pop)
lg1 <- lgcp(data=dat,
pop.var = c("popdens"),
boundary=square,
covariates=square_pop,
cellwidth=0.1,
laglength = 7,
mala.pars=c(200,100,1),
nchains=2)
p1 <- plot(lg1,square_pop)
aggregator(p1,
aggpoly=square_pop)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.