View source: R/general_functions.R
bound_vec | R Documentation |
Bound a numeric vector with upper and lower limits, so that anything outside the limit is replaced by the limit.
bound_vec(x, bounds)
x |
A number or numeric vector |
bounds |
A vector |
bound_vec(1:20,c(2.5,10.5))
dplyr::mutate(data.frame(a=1:20),b=bound_vec(a,c(3.2,15.7)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.