R Markdown won't knit to PDF.


I am new and studying google data analytics through Coursera. One of their lessons had me doing an activity in a R Markdown file through RStudio cloud, after finishing, I wanted to knit the markdown to a PDF so I could have a copy on file for me to review the lesson.

Unfortunately, when I do so it returns an error:

! Package inputenc Error: Unicode character ^^[ (U+001B)
(inputenc) not set up for use with LaTeX.

Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. See 6.7 Render documents containing Unicode characters | R Markdown Cookbook
Error: LaTeX failed to compile Lesson3_Sandbox.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips. See Lesson3_Sandbox.log for more info.
Execution halted

Here's the header of the markdown:

title: 'Lesson 3: R Sandbox Activity'
  pdf_document: default
  html_document: default
  word_document: default

I did try following the suggestions on the error message, installed tinytex package and even install MiKTex, but I still get an error.

Try changing the default engine if you are using unicode character

If you are not, you need to identify what outputs some unicode character and maybe adapt. It could be a package that uses unicode, and maybe does not deactivate correctly when in PDF. You could try update packages too.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.