save_png: Saves a plot as a png

View source: R/plotExportFunctions.R

save_pngR Documentation

Saves a plot as a png

Description

Saves a plot as a png

Usage

save_png(plot, path, width = NULL, height = NULL)

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

Value

no return value saves plot as png

Examples

library(lavaan)
model <- 'mpg ~ cyl + disp + hp
          qsec ~ disp + hp + wt'
fit <- sem(model, data = mtcars)
pl <- lavaanPlot(model = fit)
## Not run: 
save_png(pl, "plot.png")

## End(Not run)

lavaanPlot documentation built on May 29, 2024, 3:40 a.m.