You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the generated report embeds PDF figures under results/figures, like this one.
These figures are stored in a vector format, meaning the report can take minutes to load and print.
The solution is to change the graphics device to png in the chunk options on Line 127; this outputs PNGs to results/figures.
To make the images clear enough, fig.retina is also needed. Somewhere between 3 and 6 should be good for print quality.
knitr::opts_chunk$set(
dev="png",
fig.retina=4
)
Note: the $\LaTeX$ syntax for including an image is \includegraphics{image}, without file extensions.
Therefore, for the final report to use raster PNGs and not PDFs, one will need to delete the PDF figures first.
Alternatively, one can include a raw $\LaTeX$code block inside the R markdown to specify which extensions to look for first:
Currently the generated report embeds PDF figures under
results/figures
, like this one.These figures are stored in a vector format, meaning the report can take minutes to load and print.
The solution is to change the graphics device to
png
in the chunk options on Line 127; this outputs PNGs toresults/figures
.To make the images clear enough,
fig.retina
is also needed. Somewhere between 3 and 6 should be good for print quality.Note: the$\LaTeX$ syntax for including an image is
\includegraphics{image}
, without file extensions.Therefore, for the final report to use raster PNGs and not PDFs, one will need to delete the PDF figures first.
Alternatively, one can include a raw$\LaTeX$ code block inside the R markdown to specify which extensions to look for first:
See also knitr: Saving graphs in both pdf and png format but using pdf files in the final document - Stack Overflow
The text was updated successfully, but these errors were encountered: