简体   繁体   中英

cannot knit PDF in R studio

I am totally new to RStudio and I was working on an RMarkdown document. When I click on Knit PDF , and I keep getting the result like this:

output file: A1-soln-template__2__molly.knit.md

! Package inputenc Error: Unicode char μ (U+3BC)

(inputenc) not set up for use with LaTeX.

See the inputenc package documentation for explanation.

Type H for immediate help.

... l.142 null hypothesis: Ho:μ

Try running pandoc with --latex-engine=xelatex.

pandoc: Error producing PDF

Error: pandoc document conversion failed with error 43

Execution halted

How can I solve this and get things to work?

Thank you

Try:

install.packages('jsonlite', dependencies=TRUE, repos='http://cran.rstudio.com/')

Also, you might need to install MiKTeX .

The issue here is related to encoding. You are trying to include ASCII characters where they should not be.

In particular, you have typed:

Ho:μ

This needs to be changed to:

$H_0: \mu$

You will need to learn some LaTeX .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM