pander

R: Pander sink stack full when printing summary lm

白昼怎懂夜的黑 提交于 2019-12-08 08:52:15
问题 I am in the middle of generating a HTML report in Rstudio via pandoc for a collaborator. However pander is hitting the sink limit in R when trying to generate the output for the following summary of a lm() object. My R instance: version _ platform x86_64-apple-darwin13.1.0 arch x86_64 os darwin13.1.0 system x86_64, darwin13.1.0 status major 3 minor 1.0 year 2014 month 04 day 10 svn rev 65387 language R version.string R version 3.1.0 (2014-04-10) nickname Spring Dance The lm I am trying to

How do I include ggplots using pander's live report generation

回眸只為那壹抹淺笑 提交于 2019-12-07 22:58:27
问题 I am using pander to create docx reports via Windows7, following the examples at http://rapporter.github.io/pander/#live-report-generation. myReport <- Pandoc$new(author="Jerubaal",title="Plot Anything", format="docx") I've tried the example myReport$add(plot(1:10)) and that doesn't work on Windows, but does on Linux. Previously I got plots appearing using brew files and <%=plot(1:10)=>, but I am trying out the Live Report Generation because that method seems most suited to me. I've also

Column widths not aligned with table data in pander tables sent from R with sendmailr

喜夏-厌秋 提交于 2019-12-07 04:37:40
问题 I'm working with the 'pander' and 'sendmailr' packages to send a small data frame in the body of an email, rather than as an attachment. I'd like to send it from and to a gmail account. I'm close, but the column headers won't align with the columns themselves in the email body the way they do in Rstudio for example- basically the column headers are too wide to line up with the data columns below them. It seems the problem is the way the dashes and whitespaces are compressed in various email

Change default alignment in pander (pandoc.table)

旧时模样 提交于 2019-12-07 00:57:29
问题 I am currently switching to pander for most of my knitr-markdown formatting, because it provides such great pandoc support. One of the things I am not so happy with is the default center-alignment. Marketing people may love it, but for technical reports it is an horror. The best choice used by Hmisc is to use left alignment for texts and dates by default, and right alignment for number of all type. Is there a simple way to get this globally set in pander ? library(pander) pander(data.frame(

Generating pander tables in a loop in RMarkdown in Rstudio

匆匆过客 提交于 2019-12-06 03:41:41
问题 I've a set of tables that I'm generating with use of the code similar to the snippet below: ```{r tables, echo=TRUE, eval=TRUE} require(reshape2); require(pander) data("mtcars") data("AirPassengers") dta_lst <- list(mtcars, AirPassengers) for (i in 1:length(dta_lst)) { pander(melt(head(dta_lst[[i]], n = 2), varnames = c("Something"), value.name = "Something else"), caption = paste("Some table for: ", class(dta_lst[[i]]))) } ``` When I run the code it produces the desired output (naturally,

Column widths not aligned with table data in pander tables sent from R with sendmailr

孤街浪徒 提交于 2019-12-05 11:39:30
I'm working with the 'pander' and 'sendmailr' packages to send a small data frame in the body of an email, rather than as an attachment. I'd like to send it from and to a gmail account. I'm close, but the column headers won't align with the columns themselves in the email body the way they do in Rstudio for example- basically the column headers are too wide to line up with the data columns below them. It seems the problem is the way the dashes and whitespaces are compressed in various email clients (I tried this in gmail, yahoo and hotmail through the web and through the email client that

Change default alignment in pander (pandoc.table)

ぐ巨炮叔叔 提交于 2019-12-05 04:23:00
I am currently switching to pander for most of my knitr-markdown formatting, because it provides such great pandoc support. One of the things I am not so happy with is the default center-alignment. Marketing people may love it, but for technical reports it is an horror. The best choice used by Hmisc is to use left alignment for texts and dates by default, and right alignment for number of all type. Is there a simple way to get this globally set in pander ? library(pander) pander(data.frame( name = letters[1:3], size = 1:3, we.have.dates = Sys.Date() - 1:3 )) Thanks for you kind words and great

Generating pander tables in a loop in RMarkdown in Rstudio

三世轮回 提交于 2019-12-04 08:12:26
I've a set of tables that I'm generating with use of the code similar to the snippet below: ```{r tables, echo=TRUE, eval=TRUE} require(reshape2); require(pander) data("mtcars") data("AirPassengers") dta_lst <- list(mtcars, AirPassengers) for (i in 1:length(dta_lst)) { pander(melt(head(dta_lst[[i]], n = 2), varnames = c("Something"), value.name = "Something else"), caption = paste("Some table for: ", class(dta_lst[[i]]))) } ``` When I run the code it produces the desired output (naturally, the provided example makes little sense, in my proper data I melt the data in sensible manner): ---------

In knitr, no output from pander in for loop

假装没事ソ 提交于 2019-12-04 03:19:57
Using knitr in RStudio, pander does not produce any (or correct) html output when in a for loop. Here is a minimal case, as an Rmd input file. --- title: "Untitled" output: html_document --- Testing why pander doesn't work in for loop ```{r global_options, include=FALSE} knitr::opts_chunk$set(fig.width=7, fig.height=5, echo=FALSE, warning=FALSE, message=FALSE) ``` ```{r} library(pander) r <- 1:10 print("pander at top level") pander(summary(r)) # works print("pander in for loop") for (i in 1:2) pander(summary(r)) #does not work (nothing in output) for (i in 1:2) print(pander(summary(r))) #does

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

安稳与你 提交于 2019-12-02 22:43:06
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)) } knitsPDF(name) # insert file name of .Rmd file produces this table in the PDF file: How can I 1. Reduce width