# Tag Info

## New answers tagged r

0

Thanks to Ulrike Fischer's comment, I was able to resolve the issue myself. Using RStudio as an editor, it turns out that the Rnw file was still compiled using pdftex. Thus, the luatex-chunk needed a different package to be used compared to the pdftex-document (inputenc vs fontspec). As I was not able to set luatex as a compiler in RStudio, I used XeLaTex ...

2

Here is an example of getting the output out in the LaTeX output without any "R" stuff. %%% Save this file as filename.Rnw and then run knitr or sweave followed by pdflatex and a pdf viewer. \documentclass[10pt,letterpaper]{article} \begin{document} hi <<echo=FALSE>>= Data <- mtcars nn<-nrow(Data) @ Hello again, there are \Sexpr{nn} ...

0

Disclaimer: As I'm not an R-Expert I had some problems to understand the above linked code and to reproduce the same result. Indeed I had no contact with R before. Therefore I needed some hours to finally get the advertised result. So this answer could be (partially) wrong. The code (Rwn-file) seems to be some kind of a template or generator that needs to ...

0

Alright, here is a solution to my own question in case anyone else wants/needs to do this. \documentclass[10pt, letterpaper]{article} \usepackage[nomarkers, nolists]{endfloat} \usepackage[aboveskip=1pt,labelfont=bf,labelsep=period,justification=raggedright,singlelinecheck=off]{caption} \begin{document} << setUp, echo = FALSE >>= # Function to ...

0

With the Sweave function of R (or with its successor knitr) you do not need make one .tex file per each data frame. Instead, you can make a LaTeX file with the .Rnw extension and insert one/several chunk/s of R code (between lines with <<>>= and @) containing all the data frames and the R code for LaTeX/verbatim printing. One example with ...

1

As a follow up to @Werner's excellent explanation, as I was using R I created a sanitise function to use instead of the default xtable::sanitize function that escapes these appropriately. The package optiRum can be downloaded for the sanitise function to be used.

0

One solution is provided here (with an example provided via GitHub). But as @Ian Gow stated in his question: its a bit clunky.

2

Another unlisted solution is the full version of Adobe Acrobat. I tried the majority of the solutions listed here, which all failed pretty miserably. Adobe successfully converted nearly everything perfectly, including: most equations almost all formatting images/generated figures

Top 50 recent answers are included