Compiling a RSweave file: File is not ASCII

latex, pdflatex, r, rstudio

Solution

Replace the "smart" (non-ASCII) single quotes with apostrophes.

I'm not quite sure why you're putting this in verbatim: is this part of a debugging exercise, or do you really want that? More likely, you want

\usepackage[utf8]{inputenc}

in your LaTeX preamble or

options(useFancyQuotes=FALSE)

in your R setup code.

Problem

Here is my problem: ``` \begin{verbatim} Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 \end{verbatim} ``` I keep getting this error message when I compile it: grDevices::pdf.options(useDingbats = FALSE); utils::Sweave('Applied04.Rnw') Error: ‘Applied04.Rnw’ is not ASCII and does not declare an encoding Execution halted I have no idea what is going on. I have used verbatim already. Can someone tell me what is wrong here please ?

Original source