View source: R/scanstatistics_general.R
score_locations | R Documentation |
For each location, compute the average of the statistic calculated for each space-time window that the location is included in, i.e. average the statistic over both zones and the maximum duration.
score_locations(x, zones)
x |
An object of class |
zones |
A list of integer vectors. |
A data.table
with the following columns:
The locations (as integers).
For each location, the sum of all window statistics that the location appears in.
The number of spatial zones that the location appears in.
The total score divided by the number of zones and the maximum duration.
The score divided by the maximum score.
# Simple example set.seed(1) table <- data.frame(zone = 1:5, duration = 1, score = 5:1) zones <- list(1:2, 1:3, 2:5, 4:5, c(1, 5)) x <- list(observed = table, n_locations = 5, max_duration = 1, n_zones = 5) score_locations(x, zones)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.