Learn R Programming

HDSpatialScan (version 1.0.4)

plotSummary: Generic function to plot a summary

Description

This function is a generic function to plot a summary.

Usage

plotSummary(x, ...)

Value

No value returned, plots the summary.

Arguments

x

An object for which the summary is to be plotted.

...

Additional arguments affecting the summary produced.

See Also

plotSummary.ResScanOutputMulti, plotSummary.ResScanOutputUniFunct and plotSummary.ResScanOutputMultiFunct

Examples

Run this code
# \donttest{
library(sp)
data("map_sites")
data("multi_data")
coords <- coordinates(map_sites)

res_mnp <- SpatialScan(method = "MNP", data = multi_data, sites_coord = coords,
system = "WGS84", mini = 1, maxi = nrow(coords)/2,
variable_names = c("NO2", "O3", "PM10", "PM2.5"))$MNP

plotSummary(x = res_mnp, type = "mean")# }
# \dontshow{
library(sp)
data("map_sites")
data("multi_data")
indices <- c(51:75)
coords <- coordinates(map_sites[indices,])
res_mnp <- SpatialScan(method = "MNP", data = multi_data[indices,],
sites_coord = coords, system = "WGS84", mini = 1, maxi = nrow(coords)/2,
MC = 99)$MNP
if(length(res_mnp$sites_clusters)>0){
plotSummary(x = res_mnp, type = "mean")
}
# }

Run the code above in your browser using DataLab