| type_jitter | R Documentation |
Type function for plotting jittered points.
Arguments are passed to jitter.
type_jitter(factor = 1, amount = NULL)
factor |
numeric. |
amount |
numeric; if positive, used as amount (see below),
otherwise, if Default ( |
The result, say r, is r <- x + runif(n, -a, a)
where n <- length(x) and a is the amount
argument (if specified).
Let z <- max(x) - min(x) (assuming the usual case).
The amount a to be added is either provided as positive
argument amount or otherwise computed from z, as
follows:
If amount == 0, we set a <- factor * z/50 (same as S).
If amount is NULL (default), we set
a <- factor * d/5 where d is the smallest
difference between adjacent unique (apart from fuzz) x values.
# "jitter" type convenience string
tinyplot(Sepal.Length ~ Species, data = iris, type = "jitter")
# Use `type_jitter()` to pass extra arguments for customization
tinyplot(Sepal.Length ~ Species, data = iris, type = type_jitter(factor = 0.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.