Stéphane Laurent
Stéphane Laurent

Reputation: 84519

Two chunks side by side with knitr markdown

With Rmarkdown, how could we do to get two chunk outputs side by side ?

I have naively tried this which doesn't work:

<div class="container-fluid">
    <div class="row-fluid">
        <div class="span4">
```{r one, eval=TRUE, echo=FALSE}
......
......
```
        </div>
        <div class="span4">
```{r two, eval=TRUE, echo=FALSE}
......
......
```        
        </div>           
    </div>
</div>  

Actually, more precisely, I want to generate two figures side by side. I know this is possible with only one figure using mfrow() for classical plots or grid.arrange() for ggplots, but I'd like to include two html legends, one below each figure.

NB: I'm rather ignorant in HTML.

Upvotes: 7

Views: 5095

Answers (1)

ano
ano

Reputation: 704

I found a similar question that provides some possible code solutions and a link to the Docco standard style, which shows a nice example:

2 Column Report in R Markdown - Render HTML aside Data Frame

Upvotes: 1

Related Questions