# \donttest{
library(sp)
data("map_sites")
data("multi_data")
uni_data <- multi_data[,1]
coords <- coordinates(map_sites)
res_unp <- SpatialScan(method = "UNP", data=uni_data, sites_coord = coords,
system = "WGS84", mini = 1, maxi = nrow(coords)/2)$UNP
summary(object = res_unp, type_summ = "nparam")# }
# \dontshow{
library(sp)
data("map_sites")
data("multi_data")
uni_data <- multi_data[,1]
coords <- coordinates(map_sites)
res_unp <- SpatialScan(method = "UNP", data=uni_data, sites_coord = coords,
system = "WGS84", mini = 1, maxi = nrow(coords)/2, MC = 9)$UNP
if(length(res_unp$sites_clusters)>0){
summary(object = res_unp, type_summ = "nparam")}
# }
Run the code above in your browser using DataLab