Cant knit rmarkdown document

Could you add a little example dataset and code for just the part of the .Rmd document that is causing the problem. If you haven't ever made a reproducible example (i.e., reprex) before, you can get some ideas here:

Based on questions and answers I saw here and here that I found from searching the error message, I'm guessing this is somehow related to latex.