floor_ceiling | R Documentation |
Replace minimum value with a specified floor
floor_ceiling(x, min.val = NULL, max.val = NULL)
x |
A numeric vector |
min.val |
The minimum value of the dataset |
max.val |
The maximum value of the dataset |
A new vector where the values < min.val are replaced with min.val (and likewise for the max values)
testval = c(-1, 0, 0, 60, 100, 101)
floor_ceiling(testval, min.val=-1, max.val=100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.