0

I am trying to print a long code, highlighted with R syntax, at the end of my thesis, written in R markdown. I am knitting to pdf. I receive the error: ! Dimension too large.

I am copy pasting my code into the document:

```R Pasted code ```

I was wondering if there is a way to avoid the error when printing my code in R markdown.

  • 1
    Have you tried to cut your code in multiples chunks? – YCR May 14 '18 at 08:39
  • That would probably work, but would be very tedious, as it's a very long code. It's my last resort! – Ezra Herman May 14 '18 at 09:06
  • In R-studio you could compile a report using `rmarkdown::render("yourCode.R", "pdf_document")` After that combine thesis and code pdfs considering [this](https://stackoverflow.com/a/26846704/6574038) answer, – jay.sf May 19 '18 at 17:09

0 Answers0