View source: R/plotExportFunctions.R
embed_plot_pdf | R Documentation |
Embeds a plot into an rmarkdown pdf
embed_plot_pdf(plot, path, width = NULL, height = NULL)
plot |
plot object created by |
path |
Filename to save the image |
width |
width of image in pixels, NULL for default |
height |
height of image, NULL for default |
no return value calls include_graphics
to embed plot in pdf
library(lavaan)
model <- 'mpg ~ cyl + disp + hp
qsec ~ disp + hp + wt'
fit <- sem(model, data = mtcars)
pl <- lavaanPlot(model = fit)
## Not run:
embed_plot_pdf(pl, "plot2.pdf")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.