[Tex/LaTex] Export plots from R directly to Latex

graphicsr

Is there a way to export plots from R directly to latex, more specifically TexStudio? I think exporting/saving the image from R and then importing it to R looses some of the quality. I saw on the internet that I can use tikz package and try to re-create the plot in Latex but that can't re-create all of my plots. Isn't there a way to do the code in R and export it directly to tex?

I'm trying to get the best image quality as possible for my thesis.

Best Answer

If you save the plots in a scalable format such as PDF you should be able to include them with no loss of quaility in LaTeX using

\includegraphics{file.pdf}