Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

intFun.min.max.int.diff

Range and interval for color bar legend (difference)


Description

This function returns the minimum, maximum, and interval value that can be used to define a color bar legend for plotting differences. The function ensures that the absolute values of the minimum and maximum are identical. For instance, consider a bias that ranges from -10 to 300. The resulting minimum and maximum value used by the color scheme are then -300 and 300, respectively. The function is similar to intFun.min.max.int.bias, but does not exclude extremes.

Usage

intFun.min.max.int.diff(x)

Arguments

x

An R object

Value

Minimum, maximum, and interval value for color bar legend used for plotting biases.

Examples

library(raster)
library(classInt)
# create a raster object
data <- runif(100,-23,864)
data <- matrix(data, ncol=10)
data <- raster::raster(data)
# Get min, max, and interval for color bar legend
mmi <- intFun.min.max.int.diff(data)

amber

Automated Model Benchmarking R Package

v1.0.3
GPL-3
Authors
Christian Seiler [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.