1

I had running scripts in R Markdown to produce .pdf documents that included figures in the outputs. I have run them for a while with no issues.

After updating to RStudio 1.4, I am getting the following error when trying to create the .pdf output using Rmarkdown:

! Missing $ inserted.
<inserted text> 
                $
l.225 ...files/figure-latex/unnamed-chunk-6-1.pdf}

As suggested in https://yihui.org/tinytex/r/#debugging, I have followed the steps updating my R packages and tinytex, but the issue persist.

Any ideas what is generating this issue and if it is related to the update to RStudio 1.4?

Thanks

gfmg1992
  • 99
  • 2
  • 8
  • needs a reproducible example - a short piece of markdown that replicates the problem. https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – dww Mar 10 '21 at 13:00

1 Answers1

1

You have latex that isn't properly closed. This generates the same error. A donut will cost you $5 \int with tax.

If your intention was to make latex, you gotta close the expression with another $. Or if it wasn't, you gotta escape the backslash with another backslash. \\int.

Vons
  • 3,277
  • 2
  • 16
  • 19