AnoAgree: Percentage of anomalies which agrees with the sign of the...

Description Usage Arguments Value Examples

View source: R/AnoAgree.R

Description

This function computes the mean and the percentage of agreement between anomalies.

Usage

1
AnoAgree(ano, membersdim, na.rm = TRUE, ncores = NULL)

Arguments

ano

A multidimensional array.

membersdim

The dimension in which models are stored.

na.rm

A logical indicating whether missing values should be removed. If na.rm is FALSE an NA value in any of the arguments will cause a value of NA to be returned, otherwise (TRUE by default) NA values are ignored.

ncores

The number of cores to be used when computing the agreement.

Value

An array of one dimension less than the ano object, except for one dimensional arrays or vectors, for which an array of dimension 1 called 'var' is returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Example with random sample:
a <- NULL
for(i in 1:20) { a <- c(a, rnorm(6)) }
dim(a) <- c(lat = 2, lon = 3, var = 4, mod = 5)

agree <- AnoAgree(ano = a, membersdim = which(names(dim(a)) == 'mod'), na.rm = TRUE, ncores = NULL)
print(agree)

a <- rnorm(6)
agree <- AnoAgree(ano = a, membersdim = 1, na.rm = TRUE, ncores = NULL)
print(agree)

ClimProjDiags documentation built on Jan. 7, 2021, 5:10 p.m.