| type_jitter | R Documentation |
Type function for plotting jittered points.
Arguments are passed to jitter.
type_jitter(factor = 1, amount = NULL)
factor |
numeric; used in calculation of |
amount |
number or |
The result of r <- x + amount * runif(n, -1, 1)
where n <- length(x).
When amount is NULL (the default)
amount <- factor * d/5 where d is about the smallest
difference between adjacent unique (up to fuzz) x values.
If amount == 0, amount <- factor * (max(x) - min(x))/50,
(using only finite x values), which is the same as in S and the
references.
In the above cases, the final amount is always ensured to be positive.
The short jitter() function is itself a succinct definition.
# "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.