2 column Section in R Markdown

后端 未结 5 1924
情书的邮戳
情书的邮戳 2020-11-28 01:51

I\'m very new at R Markdown and I\'m putting together an R Markdown HTML page for some new R users at my work to give them an intro and walk them through some simple demos.

5条回答
  •  悲&欢浪女
    2020-11-28 02:19

    The custom css solution from rawr is good, but there is another way if you would like even more customisation and avoid explicit css entirely. Since markdown uses Bootstrap-layout we can use Bootstraps grid layout for in-detail-styling:

    The only drawback are a couple of html-tags extra

    Example:

    ---
    title: "test"
    author: "Testperson"
    output:
      html_document
    ---
    
    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = TRUE)
    ```
    
    ## R Markdown
    
    This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see .
    
    When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
    
    
    ```{r cars, warning = FALSE, echo = FALSE, dev=c('svg')} plot(pressure) ```
    ```{r pressure, warning = FALSE, echo=FALSE, dev=c('svg')} plot(pressure) ```

提交回复
热议问题