I am putting together an R Markdown HTML page for some new R users at my work to give them an introduction and walk them through some simple demos.
While showing off things like head
and tail
, it ends up looking messy and long because it prints out each output one after the other. I would like them as long as other sections of my .Rmd to be split into two columns.
In my research, I came across this question. There was some discussion of workarounds with HTML code I did not understand.
I did try including:
<div class="columns-2">
</div>
from the official rmarkdown
documentation, but it did not have any effect.
As I was ready to give up, there was a comment on the Stack Overflow question by @Molx saying that you can separate columns with ***
, but it did not give any further explanation. I tried it out in a few ways: I included the ***
in the middle of my R code chunk, I separated my R code chunks and put the ***
between the two. When I did the latter, the ***
simply became a horizontal rule and did nothing with columns.
I am hoping to avoid tables and CSS if possible.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…