R markdown not knitting because of parse raw had been removed - r

I've been having problems on knitting Rmarkdown, and it's been frustrating that I have no idea what to do. Every time I knit them, it always ended up with an error like this
output file: -R--Pengenalan_R.knit.md
--parse-raw/-R has been removed. Use +raw_html or +raw_tex extension.
Unknown option ---Pengenalan_R.knit.md.
Try pandoc.exe --help for more information.
Error: pandoc document conversion failed with error 6
Execution halted
I've also tried to reinstall my Rstudio but it doesn't work either. Does anyone have a clue how to solve this? Thank you in advance!

Related

Cant Knit to pdf or html

I'm trying to knit to pdf
I've installed the tinytex and kakble extra packages but it does not knit to any desired format
see the error in the screenshot below
is there something I'm doing wrong or a script or something
Kindly assist me to fix this ... although I'm new to rmd.
check error_per_server_lst, it says that the object does not exists.

! LaTeX Error: File `knitr.sty' not found

I am trying to knit a simple markdown file to a pdf using knitr and R Studio. The chunks all run fine and I have no problems knitting to an HTML document, but get the following error when trying to knit to a pdf:
! LaTeX Error: File `knitr.sty' not found.
I have reinstalled tinytex and made sure that the knitr and rmarkdown packages are up to date. I've looked around and while there are similar issue with other *.sty files, I can't find anything relating to this one.
Thanks in advance for any advice
Solved this: for some reason I had listed several R packages in the 'extra_dependencies' part of the YAML metadata. Once removed it worked.

Error message while trying to create PDF in R Markdown

I'm trying to create a PDF in R Markdown and I keep getting this error message every time I try to click "Knit to PDF":
output file: test_4_for_r.knit.md
Output created: test_4_for_r.pdf
Error in tools::file_path_as_absolute(output_file) :
file 'test_4_for_r.pdf' does not exist
Calls: <Anonymous> -> <Anonymous>
In addition: Warning message:
In readLines(logfile) : incomplete final line found on 'test_4_for_r.log'
Execution halted
I do not have a lot of familiarity with RStudio, so I have no idea why I'm getting this message. I've read several things online saying creating PDFs in R Markdown requires several packages, but so far I've only found the name of knitr. That is the only one I have currently installed. I'm not sure if that is the issue or not.
Can someone please point me in the right direction on how to remedy this? Any help would be GREATLY appreciated.
In R-Studio Tools > Global Options, under the Sweave tab, try changing "Weave Rnw using:" from sweave to knitr. Also try
install.packages('tinytex')
tinytex::install_tinytex()
and then try to knit your PDF.
If those don't work, please paste the markdown code giving you trouble. Could you knit the example markdown file, found when you File > New File > R Markdown?

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.

Converting Knitr to PDF

I am trying to convert my knitr to a PDF.
Currently I have been trying the drop down menu in RStudio and selected Knit to PDF.
Error: pandoc version 1.12.3 or higher is required and was not found.
I have downloaded Pandoc here (pandoc-1.15.0.6-windows.msi):
https://github.com/jgm/pandoc/releases
I tried re-running it and the same problem keeps occurring. I am not sure if it is a directory issue or if I am just typing something wrong in but I am having major trouble with this.
Would someone be able to produce a reproducible example in how to type this into R.
Any help would be greatly appreciated and would save me big time. (By the way, I have no trouble with HTML, just PDF)
Thanks!

Resources