Description Usage Arguments Examples
This function capps the lowest and highest values of a numeric vector at specified percentiles. It can be used both with numeric vectors or data frames with mutate or map_at.
1 | cap_at_percentile(x, floor = 0.025, roof = 0.975)
|
x |
A vector or data frame |
floor |
Bottom percentile. Defaults to 0.025 |
roof |
Top percentile. Defaults to 0.975 |
1 2 3 4 5 6 | x <- seq(1, 100, 1)
cap_at_percentile(x)
data <- data_frame(x = seq(1, 100, 1))
data %>%
mutate(y = cap_at_percentile(x))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.