is_diverging | R Documentation |
Whether or not a vector is a diverges a value, returns a logical. Used to help default a scale_color for ggplot2.
is_diverging(x, mid_pt = 0)
x |
A vector to check the divergence of. |
mid_pt |
A single number checking divergence from. Defaults to 0. |
Logical, whether or not x
is a diverges mid_pt
.
Other cheem utility:
as_logical_index()
,
color_scale_of()
,
contains_nonnumeric()
,
is_discrete()
,
linear_tform()
,
logistic_tform()
,
problem_type()
,
rnorm_from()
,
sug_basis()
,
sug_manip_var()
library(cheem)
is_diverging(-10:10)
is_diverging(-10:-5)
is_diverging(mtcars$mpg, 25)
is_diverging(mtcars$mpg, 40)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.