get.stclusters: Gets areas in a spatio-temporal cluster

Description Usage Arguments Value Examples

View source: R/knutils.R

Description

This function is similar to get.knclusters but it also allows for spatio-temporal clusters.

Usage

1
get.stclusters(stfdf, results)

Arguments

stfdf

A sp or spacetime object with the information about the data.

results

Results from a call to DetectClustersModel

Value

A list with as many elements as clusters in 'results'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library("DClusterm")
library("RColorBrewer")

data("brainNM")
data("brainNM_clusters")

stcl <- get.stclusters(brainst, nm.cl0)
#Get first cluster
brainst$CLUSTER <- ""
brainst$CLUSTER[ stcl[[1]] ] <- "CLUSTER"

#Plot cluster
stplot(brainst[, , "CLUSTER"], at = c(0, 0.5, 1.5), col = "#4D4D4D",
  col.regions = c("white", "gray"))

DClusterm documentation built on Feb. 22, 2020, 3:01 a.m.