R/sequential.hotspots.R

Defines functions sequential.hotspots

Documented in sequential.hotspots

sequential.hotspots <-
function(dataset, submats, region.column, first.subsampl.col, confidence = 0.95) {

  n.submats <- length(submats)
  hots <- hotspots.maps <- vector("list", n.submats)
  hotspots.thresholds <- vector("numeric", n.submats)

  for (s in 1:n.submats) {
    subsampl.columns <- first.subsampl.col : ncol(submats[[s]])
    hots[[s]] <- hotspots(dataset = dataset, submat = submats[[s]], region.column = region.column, subsampl.columns = subsampl.columns, confidence = confidence)
    hotspots.thresholds[s] <- hots[[s]]$threshold
    hotspots.maps[[s]] <- hots[[s]]$hotspots
    names(hotspots.maps)[s] <- names(hotspots.thresholds)[s] <- names(submats)[s]
  }

  return(list(hotspots.thresholds = hotspots.thresholds, hotspots.maps = hotspots.maps))

}

Try the DeadCanMove package in your browser

Any scripts or data that you put into this service are public.

DeadCanMove documentation built on May 2, 2019, 6:48 p.m.