Hao Zhu | bff0191 | 2017-05-23 18:05:00 -0400 | [diff] [blame] | 1 | --- |
| 2 | title: "Untitled" |
| 3 | output: html_document |
| 4 | --- |
| 5 | |
| 6 | ```{r setup, include=FALSE} |
| 7 | knitr::opts_chunk$set(echo = TRUE) |
| 8 | ``` |
| 9 | |
| 10 | ## R Markdown |
| 11 | |
| 12 | 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 <http://rmarkdown.rstudio.com>. |
| 13 | |
| 14 | 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: |
| 15 | |
| 16 | ```{r cars} |
| 17 | library(knitr) |
| 18 | library(kableExtra) |
| 19 | library(xml2) |
| 20 | |
| 21 | dt <- data.frame( |
Hao Zhu | f13a35e | 2017-05-24 00:55:43 -0400 | [diff] [blame] | 22 | row_id = c("abb", "xxx", "aaa"), |
Hao Zhu | bff0191 | 2017-05-23 18:05:00 -0400 | [diff] [blame] | 23 | contents = c( |
Hao Zhu | f13a35e | 2017-05-24 00:55:43 -0400 | [diff] [blame] | 24 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vehicula tempor ex. Morbi malesuada sagittis turpis, at venenatis nisl luctus a. ", |
| 25 | "In eu urna at magna luctus rhoncus quis in nisl. Fusce in velit varius, posuere risus et, cursus augue. Duis eleifend aliquam ante, a aliquet ex tincidunt in.", |
| 26 | "Vivamus venenatis egestas eros ut tempus. Vivamus id est nisi. " |
Hao Zhu | bff0191 | 2017-05-23 18:05:00 -0400 | [diff] [blame] | 27 | ), |
| 28 | contents2 = c( |
| 29 | "Lorem ipsum dolor", |
| 30 | "In eu urna ", |
| 31 | "Vivamus venenatis" |
| 32 | ), |
| 33 | contents3 = c( |
Hao Zhu | f13a35e | 2017-05-24 00:55:43 -0400 | [diff] [blame] | 34 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vehicula tempor ex. Morbi malesuada sagittis turpis, at venenatis nisl luctus a. ", |
| 35 | "In eu urna at magna luctus rhoncus quis in nisl. Fusce in velit varius, posuere risus et, cursus augue. Duis eleifend aliquam ante, a aliquet ex tincidunt in. ", |
| 36 | "Vivamus venenatis egestas eros ut tempus. Vivamus id est nisi. Aliquam molestie erat et sollicitudin venenatis. In ac lacus at velit scelerisque mattis. " |
Hao Zhu | bff0191 | 2017-05-23 18:05:00 -0400 | [diff] [blame] | 37 | ) |
| 38 | ) |
| 39 | |
| 40 | kable(dt, "html") %>% |
| 41 | kable_styling() %>% |
| 42 | column_spec(2, "5cm", bold = T) %>% |
| 43 | column_spec(4, "3cm", italic = T) |
| 44 | ``` |
| 45 | |