Saves a plot as a png
Arguments
- plot
plot object created by
lavaanPlot
- path
filename to save the image
- width
width of image in pixels, NULL for default
- height
height of image, NULL for default
Examples
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")
}