View source: R/experiment_utils.R
impose_floor | R Documentation |
Imposes a floor on the given array a, ensuring that its elements are greater than or equal to amin.
impose_floor(a, amin)
a |
Numeric vector. Must not contain NA values. |
amin |
Numeric. Minimum allowed value. Must be between 0 and 1. |
A numeric vector with the same length as a
, with the floor imposed on its elements.
a <- c(0.25, 0.25, 0.25, 0.25)
imposed_a <- impose_floor(a = a, amin = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.