Dear all,
After I install R 4.2.2, Rtools42, and RStudio-2022-12.0-353, I constantly receive the error message below whenever I knit Rmarkdown in any output. I'm not able to pin down the issue because I receive the same error when I knit a basic Rmarkdown file (i.e. the basic one generated by RStudio). Please, let me know if you need further descriptions to help me.
I have a solution! Try to remove the package "xfun" from the packages section. And reinstall. Now I can knit to PDF. That is what worked for me, I hope it helps!
Have you updated R from and older version?, if so, you also need to update your R packages to make sure they are compiled for the new version, you can do it with this command
This also worked for me just now. I had an outdated version of xfun that I think knitting was using, and updating that fixed it. (The error message didn't suggest to me that this is what it was, so thanks lucy3.)