Description Usage Arguments Value Author(s) Examples
View source: R/truncate_vector.R
Truncate (or trim) a vector on one or both sides, by user defined percentages
1 | truncate_vector(Vector, pct_trunc_left = 10, pct_trunc_right = 10)
|
Vector |
A vector of numerical values |
pct_trunc_left |
A number denoting the percentage to truncate from left. For 10% enter 10. |
pct_trunc_right |
A number denoting the percentage to truncate from right. For 10% enter 10. |
Returns a truncated vector
Subhrangshu Nandi, PhD Statistics, UW Madison; snandi@wisc.edu or nands31@gmail.com
1 2 | vector <- c(2, 3, 5, 2, 1, 2, 3, 5, 2, 1, 2, 3, 5, 2, 1, 2, 3, 5, 2, 1, 2, 3, 5, 2, 1)
truncate_vector(vector, 5, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.