| get_stats | R Documentation |
get_stats returns a vector of stats names, written as character
strings, that describes which stats in which order are used by a plot.
get_stats(p)
p |
A ggplot object |
A vector of character strings. Each element corresponds to the suffix
of a ggplot2 stat_ function, e.g. c("identity", "smooth").
Other functions for checking stats:
ith_stat_is(),
ith_stat(),
uses_stats()
require(ggplot2)
p <- ggplot(data = mpg, mapping = aes(x = displ, y = hwy)) +
geom_point(mapping = aes(color = class)) +
geom_smooth()
get_stats(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.