
Last chance! 50% off unlimited learning
Sale ends in
ggplot
.Transform object of any other class to an object of class ggplot
.
ggplot_converter(plot)
A plot that needs to be converted to object of class ggplot
.
# NOT RUN {
library(ggplot2)
# creating a plot that is not of class `ggplot`
p <- ggExtra::ggMarginal(ggplot(mtcars, aes(wt, mpg)) + geom_point())
# checking class of object
class(p)
# checking class of converted plot
p_converted <- ggstatsplot::ggplot_converter(p)
class(p_converted)
# }
Run the code above in your browser using DataLab