pander

Is there an option to control output page orientation (using knitr->pander->pandoc->docx)

牧云@^-^@ 提交于 2020-05-10 08:45:54
问题 I am playing with Tal's intro to producing word tables with as little overhead as possible in real world situations. (Please see for reproducible examples there - Thanks, Tal!) In real application, tables are to wide to print them on a portrait-oriented page, but you might not want to split them. Sorry if I have overlooked this in the pandoc or pander documentation, but how do I control page orientation (portrait/landscape) when writing from R to a Word .docx file? I maybe should add tat I

Is there an option to control output page orientation (using knitr->pander->pandoc->docx)

两盒软妹~` 提交于 2020-05-10 08:44:08
问题 I am playing with Tal's intro to producing word tables with as little overhead as possible in real world situations. (Please see for reproducible examples there - Thanks, Tal!) In real application, tables are to wide to print them on a portrait-oriented page, but you might not want to split them. Sorry if I have overlooked this in the pandoc or pander documentation, but how do I control page orientation (portrait/landscape) when writing from R to a Word .docx file? I maybe should add tat I

Table in Bookdown/Huskydown with several features (Citation, Caption, URL, PNG Figure, …)

ぃ、小莉子 提交于 2020-03-10 04:39:24
问题 I would like to include a table in an R markdown document (Bookdown/Huskydown) which should meet the following requirements. Ideally, the table works with several output formats, e.g. LaTex/PDF and HTML. Requirements: Table width: fixed Cell width: fixed Vertical alignment: cell content aligned to the top Text formatting: like bold or italics (best would be if md formatting supported, such that code is output agnostic) and allow for line breaks in longer texts Citations: should be rendered

Table in Bookdown/Huskydown with several features (Citation, Caption, URL, PNG Figure, …)

拈花ヽ惹草 提交于 2020-03-10 04:39:08
问题 I would like to include a table in an R markdown document (Bookdown/Huskydown) which should meet the following requirements. Ideally, the table works with several output formats, e.g. LaTex/PDF and HTML. Requirements: Table width: fixed Cell width: fixed Vertical alignment: cell content aligned to the top Text formatting: like bold or italics (best would be if md formatting supported, such that code is output agnostic) and allow for line breaks in longer texts Citations: should be rendered

Defining custom Markdown syntax in RMarkdown / pander

▼魔方 西西 提交于 2020-02-25 06:29:46
问题 In Markdown / RMarkdown, **this** is translated to bold , _this_ is cursive etc. Is it possible to create a custom syntax? For example, that -this- (a word between two dashes) gets translated to something I define myself (via css for html and latex for pdf)? 回答1: Document parsing is done by pandoc. For this kind of customization, one would have to customize pandoc's Markdown reader (written in Haskell), and then use the self-compiled binary for knitting. One way to get close to having custom

How do I remove row names when using pander to brew a report?

随声附和 提交于 2020-01-02 07:49:20
问题 I'm trying to get my head around using R to generate reports and think I have settled on trying to just use pander , after confusing myself with various combinations of knitr , Rmarkdown , pander and reports . I now have two files: 'ReportIntro.brew' that contains the structure of the report # My Report Title ## Sample Information #### <%=set.alignment('left') ; as.character(info[1,1])%> <%=set.alignment('left') ; info[2:8,1:2]%> 'Report.R' to create a data.frame 'info' required for the

Reduce cell width and font size of table using pandoc.table()

余生颓废 提交于 2019-12-31 12:25:12
问题 I'm using knitr and pander to make a table in a markdown file. I'm converting the markdown file to a PDF using Pandoc from within R. This code: library(knitr) ```{r myTable, echo=FALSE, message=FALSE, results='asis', comment=""} library(pander) pandoc.table(head(iris)) ``` then running this function within R: knitsPDF <- function(name) { knit(paste0(name, ".Rmd"), encoding = "utf-8") callformat <-"pandoc -V geometry:margin=1in %s.md -o %s.pdf" system(sprintf(callformat, name, name)) }

pander number of digits after decimal point

强颜欢笑 提交于 2019-12-31 02:59:46
问题 I am trying to output a table using pander in a .rmd file as a pdf with 2 digits following the decimal point, but I get no digits using the following rmd: --- title: "Long table test" output: pdf_document --- Here is a table: ```{r setup} library (data.table) library (pander) set.seed(1984) longString <- "description string" dt <- data.table(id=c(1:3),description=rep(longString,3),value=rnorm(3,mean=10000,sd=1)) ``` ```{r pander-table} panderOptions('round',2) panderOptions('digits',2)

How to write (bullet) lists in a table using rmarkdown and pandoc

你离开我真会死。 提交于 2019-12-30 10:49:09
问题 I am looking to create a table in a PDF document using rmarkdown , knitr and pander . The table should be nearly identical to Table 1 shown below, except the asterisks should be bullets. Is this at all possible using only the R libraries listed above? Here is my code to produce the PDF document (and thus the table above): --- title: "xxx" author: "xxx" date: "xxx" output: word_document: default pdf_document: fig_height: 4 fig_width: 10 highlight: tango geometry: margin=3cm --- ```{r global

Create pdf-format table that can wrap the text well in rmarkdown

☆樱花仙子☆ 提交于 2019-12-25 04:57:15
问题 I used the rmarkdown to create a pdf file, where some tables are included in the output. The tables are created by using pander function. As you see, the output does not wrap the text well, so the output is quite dirty. Suppose the code is as follows: title: "Untitled" output: pdf_document --- ```{r kable} library(xtable) a <- rep(1,5) b <- rep("33333333333333333333333333333333333333333333333333333333333333333", 5) c <- rep("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh",