New to knitr and latex in RStudio

Hi all,
I am about to begin a project using latex and knitr in RStudio. I'm very familiar with all three separately, but not together. My first question is if there is a nice single go-to source on how to write documents in RStudio implementing latex and knitr. Second, I have five immediate questions.

  1. If I have a .jpg image, are there any special commands I need to use to read in the image to LaTeX with RStudio.

  2. How are .bib files handled? I'm receiving an error message that a reference can't be found, the it is definitely in my .bib file.

  3. Related to 1 and 2, where should my .bib file and other needed files be located relative to my .Rmw file. I presume all in the same folder, but just checking.

  4. What does this error message mean
    Bad Box: test.aux:116: Overfull \hbox (27.59982pt too wide) in paragraph at lines 116--116. I'm getting dozens of them.

  5. I'm also receiving an error that the document can't find a program that is, indeed, installed and loaded in RStudio. The error reads

Error in ddirichlet(x, alpha = c(5, 10, 14)): could not find

function "ddirichlet"

ddirichlet is part of MCMCpack which installed and loaded in RStudio.

Thanks in advance

David

It may be overkill but you might want to have a look at https://bookdown.org/yihui/rmarkdown-cookbook/.

BTW, Yihui reccomends installing TinyText LaTeX but I prefer to stick with my standard TexLive for Linux.

We probably need some code & sample data to see what those errors are doing.

1 Like

This topic was automatically closed 21 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.