ith_stat | R Documentation |
ith_stat
returns the type of stat used by the ith layer.
ith_stat(p, i)
p |
A ggplot object |
i |
A numerical index that corresponds to the first layer of a plot (1), the second layer (2), and so on. |
A character string that corresponds to the suffix of a ggplot2
stat_
function, e.g. "qq"
.
Other functions for checking stats:
get_stats()
,
ith_stat_is()
,
uses_stats()
require(ggplot2)
p <- ggplot(data = diamonds, aes(sample = price)) +
geom_qq()
ith_stat(p, i = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.