r - How to write multi-level (bullet) lists in a table using rmarkdown and pandoc -


i looking create table in pdf document using rmarkdown, knitr , pander. able create simple bullet list require level in list. in table shown below, require "rave reviews" bullet sub-bullet of "offers workshops..." bullet.

multibullet http://i59.tinypic.com/jtmk43.png

the issue i'm having pertains line of code below in mytable dataframe in description column. although attempt create 4 spaces required sub-bullet using \x20[1], spaces not appear - , hence no sub-bullets (although no error shown). tried obvious way of adding in 4 spaces in code no avail. attempted set r options include strip.white = false, has not proven helpful (see below).

--- title: "xxx" author: "xxx" output:   pdf_document:     fig_height: 4     fig_width: 10     highlight: tango   word_document: default geometry: margin=3cm ---  ```{r global_options, include=false, echo=false} require(knitr) opts_chunk$set(fig.width=8, fig.height=4, fig.path='figs/', dpi=500,                echo=false, warning=false, message=false, results='hide', strip.white = false) ```  ```{r pandoc_options, include=false, echo=false} require(pander) panderoptions('digits', 3) panderoptions('round', 3) panderoptions('keep.trailing.zeros', true) panderoptions('keep.line.breaks', true) ```  ```{r concepts, echo=false} mytable = data.frame(     concept     = c("decoded", "xxx"),     description = c("* founded in 2011\ \n* offers workshops take people 0 skills , knowledge in programming through coding multi-platform app using html, css , javascript in single day\ \n\x20\x20\x20\x20+ rave reviews", "xxx"),     website     = c("http://decoded.com/uk/","xxx")) ```  ``` {r concepts_descriptions, results = 'asis'} pander::pander(mytable, keep.line.breaks = true, style = 'grid', justify = 'left') ``` 

references

[1] got \x20 hint here, after attempting \\s, \s, \ \s, \\\s, etc. no avail (suggested here).

you can nest items inside bullet:

```{r concepts, echo=false} mytable = data.frame(     concept     = c("decoded", "xxx"),     description = c("* founded in 2011\ \n     * offers workshops take people 0 skills , knowledge in programming through coding multi-platform app using html, css , javascript in single day\ \n     \\begin{itemize}       \\item rave reviews \n       \\item e.t.c     \\end{itemize}", "xxx"),     website     = c("http://decoded.com/uk/","xxx")) ``` 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -