Description Arguments Value Usage Details Author(s) See Also Examples
Given a sequence this function confines the sequence values to within the specified bounds. This behavior is equivalent to clipping in digital signal processing.
| x | A numeric vector | 
| min.level | The lower bound | 
| max.level | The upper bound | 
A sequence with values outside of [min.level, max.level] clipped to those values
confine(x, min.level, max.level) confine(x, min.level=-1, max.level=1)
The confine function can be thought of a transform that limits the range of a sequence. Any values outside the range [min.level, max.level] are adjusted to be exactly min.level or max.level.
Care should be taken when using this function as it is not always a good idea to change the value of outliers. Sometimes it is better to remove these values from a data set instead.
Brian Lee Yung Rowe
| 1 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.