[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
What determines if R source block output is wrapped in begin_example or
From: |
John Hendy |
Subject: |
What determines if R source block output is wrapped in begin_example or not? |
Date: |
Thu, 13 Jan 2022 14:49:40 -0600 |
Greetings,
I was perplexed when a table in my exported latex/pdf document came
out garbled, to find out it's being included like "normal text." In
another block with well-behaving output, I observed the same src
header args, but it was wrapped in #+begin/end_example for free,
without me trying.
Here's a reproducible example. This output would not look right when exported:
#+begin_src R :exports results :results output :eval yes
data.frame(
x = c(1:3))
#+end_src
#+RESULTS:
: x
: 1 1
: 2 2
: 3 3
>From trial and error, it seems the magical length is 9 where it gets wrapped:
#+begin_src R :exports results :results output :eval yes
data.frame(
x = c(1:9))
#+end_src
#+RESULTS:
#+begin_example
x
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
#+end_example
I see nothing like this mentioned in the docs on the results of evaluation:
https://orgmode.org/manual/Results-of-Evaluation.html
For now, my workaround is to use :results output code. I guess my
typical output must usually be longer than 9, or I use :results value
and manually add header rows to the generated org table, as I don't
recall dealing with this before!
Thanks for help understanding.
Best regards,
John
- What determines if R source block output is wrapped in begin_example or not?,
John Hendy <=