GGsave?

library(ggplot2)

ggplot(mtcars, aes(wt, mpg)) + geom_point()

NULL
ggsave('/results/foo.svg', plot=gp)

# lapply(gp$layers, function(l){}

some img Image