How to save plot generated by pairs.panels from R&

2019-09-09 11:06发布

问题:

I'm using R's psych library and I'm plotting correlation pairs on a Jupyter notebook using its pairs.panels function.

I tried using ggplot's ggsave function to save the plot but it wouldn't work. The error says:

Error in ggsave(filename = "correlation-pairs.png", : plot should be a ggplot2 plot

Is there a way to save the output of pairs.panels?