impose_floor: Impose probability floor.

View source: R/experiment_utils.R

impose_floorR Documentation

Impose probability floor.

Description

Imposes a floor on the given array a, ensuring that its elements are greater than or equal to amin.

Usage

impose_floor(a, amin)

Arguments

a

Numeric vector. Must not contain NA values.

amin

Numeric. Minimum allowed value. Must be between 0 and 1.

Value

A numeric vector with the same length as a, with the floor imposed on its elements.

Examples

a <- c(0.25, 0.25, 0.25, 0.25)
imposed_a <- impose_floor(a = a, amin = 0.1)


banditsCI documentation built on April 12, 2025, 1:42 a.m.