seq_range | R Documentation |
Sequence Generation Based on the Values of a Vector
seq_range(
x,
length.out = NULL,
by = NULL,
along.with = NULL,
na.rm = TRUE,
padding = 0.05
)
seq_quantile(
x,
probs,
length.out = NULL,
by = NULL,
along.with = NULL,
na.rm = TRUE
)
seq_IQR(x, length.out = NULL, by = NULL, along.with = NULL, na.rm = TRUE)
mean_sd(x, na.rm = TRUE, out = c("vector", "data.frame"))
median_mad(x, na.rm = TRUE, out = c("vector", "data.frame"))
x |
A numeric vector |
length.out |
desired length of the sequence. If no other arguments are valued, defaults to 20. |
by |
number: increment of the sequence. |
along.with |
take the length from the length of this argument. |
na.rm |
a logical evaluating to |
padding |
Padding factor for the range. |
probs |
numeric vector of probabilities with values in
|
out |
If |
set.seed(1)
x <- rt(100, df = 3)
seq_range(x, length.out = 5)
seq_IQR(x, length.out = 5)
seq_quantile(x, c(.05, .95), length.out = 5)
mean_sd(x)
library(ggplot2)
ggplot(mtcars, aes(cyl, mpg)) +
stat_summary(aes(color = "Mean (SD)"),
fun.data = mean_sd,
fun.args = list(out = "data.frame")
) +
stat_summary(aes(color = "Median (MAD)"),
fun.data = median_mad,
fun.args = list(out = "data.frame"),
position = position_nudge(x = 0.5)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.