FAQ

How can I convert between file types?

I generally don't recommend converting back and forth between file types (this is time consuming and a bit annoying), but if you're thinking of making the switch, here are some useful websites to help you convert your file:

Can you really run R code in LaTeX?

Yes. It's called Sweave or knitr, and it's very handy!

If you have a LaTeX distribution installed, then you can compile a LaTeX file inside RStudio using Sweave. Here are some instructions explaining how to create an RSweave file and instert R chunks: https://support.rstudio.com/hc/en-us/articles/200552056-Using-Sweave-and-knitrarrow-up-right

Alternatively, you can include your R code in an Overleaf file using knitr. To start writing R chunks in your Overleaf file, simply change the file extension from main.tex to main.Rtex, and you're ready to go. Overleaf's guide on this is great, and even includes some examples: https://www.overleaf.com/learn/latex/Knitrarrow-up-right

Last updated