Search code examples
rtwitter-bootstrapgrid-layoutdashboardr-markdown

How to use Twitter bootstrap grid layout in rmarkdown?


I am planning to use rmarkdown to render html pages with R generated content for publishing on websites. The ultimate goal is to render some kind of dashboard like pages (example pages). I know rmarkdown uses twitter bootstrap for its layouts and that's why I was wondering if it is possible to use twitter bootstrap's grid layout within a rendered html document. Maybe I missed some information in the tutorials I found about rmarkdown rendering html pages, but there doesn't seem to be any example about how to do this.

Does anyone know how to start or does anyone know an example or tutorial somewhere? Many thanks in advance!


Solution

  • Use the html directly in rmarkdown and it works. Grid system overview.

    #3 column layout
    <div class="row">
      <div class="col-md-4">
      ```{r}
      #chunk
      ```  
      </div>
      <div class="col-md-4">
      </div>
      <div class="col-md-4">
      </div>
    </div>