Learn R Programming

realTimeSurv (version 1.0)

aggregator_data: Create spatial polygons data frame

Description

Aggregate to larger geography and output data

Usage

aggregator_data(obj, aggpoly, verbose = TRUE)

Arguments

obj

A lgcpReal object from the lgcp function

aggpoly

A spatialPolygons or spatialPolygonsDataFrame describing the geography to aggregate to.

verbose

Logical value indicating whether to show progress bar

Value

A spatialPolygonsDataFrame

Details

This function aggregates the output of plot or plot_hotspot to a larger geography and outputs a spatial polygons data frame that can be used to create other plots.

Examples

Run this code
# NOT RUN {
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_data(p1,
                aggpoly=square_pop)
# }

Run the code above in your browser using DataLab