powered by
Embeds a plot into an rmarkdown pdf
embed_plot_pdf(plot, path, width = NULL, height = NULL)
no return value calls include_graphics to embed plot in pdf
include_graphics
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) { embed_plot_pdf(pl, "plot2.pdf") }
Run the code above in your browser using DataLab