powered by
Saves a plot as a png
save_png(plot, path, width = NULL, height = NULL)
no return value saves plot as png
plot object created by lavaanPlot
lavaanPlot
filename to save the image
width of image in pixels, NULL for default
height of image, NULL for default
library(lavaan) model <- 'mpg ~ cyl + disp + hp qsec ~ disp + hp + wt' fit <- sem(model, data = mtcars) pl <- lavaanPlot(model = fit) if (FALSE) { save_png(pl, "plot.png") }
Run the code above in your browser using DataLab