aggregator_data: Create spatial polygons data frame

Description Usage Arguments Details Value Examples

View source: R/data_functions.R

Description

Aggregate to larger geography and output data

Usage

1
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

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.

Value

A spatialPolygonsDataFrame

Examples

 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_data(p1,
                aggpoly=square_pop)

realTimeSurv documentation built on May 18, 2021, 9:07 a.m.