floor_ceiling: Replace minimum value with a specified floor

View source: R/rescale.R

floor_ceilingR Documentation

Replace minimum value with a specified floor

Description

Replace minimum value with a specified floor

Usage

floor_ceiling(x, min.val = NULL, max.val = NULL)

Arguments

x

A numeric vector

min.val

The minimum value of the dataset

max.val

The maximum value of the dataset

Value

A new vector where the values < min.val are replaced with min.val (and likewise for the max values)

Examples

testval = c(-1, 0, 0, 60, 100, 101)
floor_ceiling(testval, min.val=-1, max.val=100)

dustinfife/flexplot documentation built on Sept. 23, 2024, 9:01 p.m.