Skip to contents

Calculates "normalized" vector; equivalent to pmin(x, y) - y

Usage

normalize_baseline(x, baseline)

Arguments

x

Numeric vector

baseline

Number to normalize against

Examples

  x <- rnorm(n = 20)
  baseline <- 0
  normalize_baseline(x, baseline)
#>  [1] -0.4899564  0.0000000 -0.8112042 -0.4570467 -0.5776655 -1.6563783
#>  [7] -1.4190724  0.0000000 -0.1607851  0.0000000 -0.3071508  0.0000000
#> [13]  0.0000000 -0.3490669 -0.3360231  0.0000000 -0.8557935 -0.1387638
#> [19] -0.1804794 -1.0163468