View source: R/moderator_pattern.R
values_at | R Documentation |
This function calculates representative values of a vector, like minimum/maximum values or lower, median and upper quartile etc., which can be used for numeric vectors to plot adjusted predictions at these representative values.
values_at(x, values = "meansd")
representative_values(x, values = "meansd")
x |
A numeric vector. |
values |
Character vector, naming a pattern for which representative values should be calculcated.
|
A numeric vector, representing the required values from x
, like
minimum/maximum value or mean and +/- 1 SD. If x
is missing, a function,
pre-programmed with n
and length
is returned. See examples.
data(efc)
values_at(efc$c12hour)
values_at(efc$c12hour, "quartiles2")
mean_sd <- values_at(values = "meansd")
mean_sd(efc$c12hour)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.