createCorridor: Corridor analysis

View source: R/matrixOps.R

createCorridorR Documentation

Corridor analysis

Description

Create a corridor around the main diagonal. For long time series it may not make sense to evaluate recurrences on the longest time scales.

Usage

createCorridor(mat, lower, upper, value = NA, silent = TRUE)

Arguments

mat

A Matrix

lower

Lower diagonal to be included in the corridor (should be \le 0)

upper

Upper diagonal to be included in the corridor (should be \ge 0)

value

A single value to replace all values outside the corridor (default = NA)

silent

Operate in silence, only (some) warnings will be shown (default = TRUE)

Value

A matrix in which the values outside the corridor have been replaced

Author(s)

Fred Hasselman

See Also

Other Distance matrix operations (recurrence plot): bandReplace(), mat_di2bi(), mat_di2ch(), mat_di2we(), mat_hamming(), rp(), rp_lineDist(), rp_nzdiags(), rp_plot(), rp_size()

Examples

# Create a 10 by 10 matrix
library(Matrix)
m <- Matrix(rnorm(10),10,10)

createCorridor(m,-7,7,0)   # Set diagonals 10 9 and 8 to 0.

FredHasselman/casnet documentation built on April 20, 2024, 3:05 p.m.