slim_data | R Documentation |
Drop unused data from the plot to reduce the object size
slim_data(p)
## S3 method for class 'ggplot'
slim_data(p)
## S3 method for class 'patchwork'
slim_data(p)
p |
A |
library(ggplot2)
p <- ggplot(data = mtcars, aes(x = mpg, y = wt, colour = cyl)) +
geom_point()
object.size(p)
colnames(p$data)
p_slim <- slim_data(p)
object.size(p_slim)
colnames(p_slim$data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.