Embeds a plot into an rmarkdown pdf
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)
#> This is lavaan 0.6-17
#> lavaan is FREE software! Please report any bugs.
model <- 'mpg ~ cyl + disp + hp
qsec ~ disp + hp + wt'
fit <- sem(model, data = mtcars)
pl <- lavaanPlot(model = fit)
if (FALSE) {
embed_plot_pdf(pl, "plot2.pdf")
}