I'd like to make a data frame that contains the summarized data (Variables and correlation values) used to generate the ggplot from GGally above.
library(ggplot2)
library(GGally)
data(flea)
p <- ggpairs(flea, columns = 2:4)
p.2.df <- ggplot_build(p)
Error in UseMethod("ggplot_build") :
no applicable method for 'ggplot_build' applied to an object of class "c('gg', 'ggmatrix')"
But unfortunately, the ggplot_build doesn't work.
Please any help with it?