zcol: Z(log) Depending Color

View source: R/zcol.R

zcolR Documentation

Z(log) Depending Color

Description

This function provides a color gradient depending on the zlog value as described in Hoffmann et al. 2017. The colours are only roughly equal to the one found in the article.

Usage

zcol(x)

Arguments

x

numeric, z(log) value.

Value

character, of length(x) with the corresponding color hex code.

Author(s)

Sebastian Gibb

References

Hoffmann, Georg, Frank Klawonn, Ralf Lichtinghagen, and Matthias Orth. 2017. "The Zlog-Value as Basis for the Standardization of Laboratory Results." LaboratoriumsMedizin 41 (1): 23–32. doi: 10.1515/labmed-2016-0087.

Examples

z <- -10:10
image(matrix(z, ncol = 1), col = zcol(z), xaxt = "n", yaxt = "n")
text(seq(0, 1, length.out=length(z)), 0, label = z)

zlog documentation built on Jan. 6, 2023, 1:25 a.m.