pandoc

Stargazer output appears below text - rmarkdown to pdf

时光毁灭记忆、已成空白 提交于 2019-11-27 07:28:38
问题 The Problem When using rmarkdown in RStudio, my stargazer(glm()) output gets positioned below the text that I would like it to. It gets positioned in a different spot than the r chunk is. The PDF is created perfectly, it's just the position of the stargazer output that is a problem. Background I am trying to create a PDF with lots of text and a couple of stargazer glm() output between a few of the paragraphs. When I put more than one stargazer() output in my rmarkdown file and then "Knit" to

pandoc version 1.12.3 or higher is required and was not found (R shiny)

时光毁灭记忆、已成空白 提交于 2019-11-27 05:31:42
问题 I have a problem generating a pdf report from my app shiny which is hosted on a server. the app works fine but when I press the button to download the report, I get this error : pandoc version 1.12.3 or higher is required and was not found. The proble is that if I type pandoc -v I get: pandoc 1.12.3.3 Compiled with texmath 0.6.6, highlighting-kate 0.5.6.1. Syntax highlighting is supported for the following languages: actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,

Is there a way to have conditional markdown chunk execution in Rmarkdown?

强颜欢笑 提交于 2019-11-27 05:29:18
问题 I am an instructor looking to make a homework assignment and homework solution guide from the same Rmarkdown file by changing a document parameter I created called soln . When soln=FALSE the assignment document is generated, and when soln=TRUE the homework solution guide is generated. I can control R code chunk execution using the document parameter, but I would also like conditional inclusion of markdown text. My current workaround is ugly: --- title: "Homework" output: word_document params:

What can I control with YAML header options in pandoc?

匆匆过客 提交于 2019-11-27 05:10:10
问题 Only by chance did I see an example document using the toc: true line in their YAML header options in a Markdown file to be processed by Pandoc. And the Pandoc docs didn't mention this option to control table of contents using the YAML header. Furthermore, I see somewhat arbitrary lines in example documents on the same Pandoc readme site. Main question: What Pandoc options are available using the YAML header? Meta-question: What determines the available Pandoc options that are available to

R doesn't recognize Pandoc Linux Mint

不羁的心 提交于 2019-11-27 04:49:09
问题 I asked a related question: check if a program is installed But am refraining from answering until I've tested the solutions for myself on all three systems. I can get pandoc to work from within R on a windows machine but on linux I get this error/response for each method from the R terminal: 1: > system('pandoc -v') sh: 1: pandoc: not found 2: > myPaths <- c("pandoc", + "~/.cabal/bin/pandoc", + "~/Library/Haskell/bin/pandoc", + "C:\\PROGRA~1\\Pandoc\\bin\\pandoc") > Sys.which(myPaths) pandoc

check if a program is installed

隐身守侯 提交于 2019-11-27 04:46:03
问题 I'm writing a function that uses pandoc in R through the command line. How can I use R to check if pandoc installed (I also assume it would have to be on the path which may be an issue for windows users)? 回答1: This suggestion is based entirely on my personal experience with this question that RStudio can't seem to read what's in my .bashrc file on my Ubuntu system. I have installed Pandoc using the cabal install pandoc method described here since there were features I needed from more recent

Slides with Columns in Pandoc

99封情书 提交于 2019-11-27 04:17:47
问题 I would like to have code and an image side-by-side in a Beamer slide. In LaTeX I would do this with columns. I would like to use markdown within the column structure. \begin{columns} \column{.5\textwidth} ~~~~~~~~Python >>> some python code ~~~~~~~ \column{.5\textwidth} ![](A_generated_image.pdf) \end{columns} Unfortunately Pandoc doesn't process the markdown within the \begin{columns} and \end{columns} statements. Is there a way around this? Is there a way to use markdown within inlined

How to convert HTML with mathjax into Latex using Pandoc?

倖福魔咒の 提交于 2019-11-27 04:00:38
I have some HTML documents with MathJax equations, and I want to convert them to Latex, and then to pdf. I'd like to use Pandoc. However, Pandoc replaces $ with \$ and it replaces \ in formulas with \textbackslash{} . Is it possible to get Pandoc to pass MathJax formulas literally from HTML to Latex? With the latest version of pandoc (1.12.2), you can do this: pandoc -f html+tex_math_dollars+tex_math_single_backslash -t latex Much nicer! If you don't want to convert math delimited by \( and \) , just do pandoc -f html+tex_math_dollars -t latex It's not an easy task. Here's a solution that

Creating a footer for every page using R markdown

北城以北 提交于 2019-11-27 00:59:32
问题 I'm writing a document in R Markdown and I'd like it to include a footer on every page when I knit a PDF document. Does anyone have any idea on how to do this? 回答1: Yes, this question has been asked and answered here: Adding headers and footers using Pandoc. You just need to sneak a little LaTeX into the YAML header of your markdown document. This markdown header does the trick: --- title: "Test" author: "Author Name" header-includes: - \usepackage{fancyhdr} - \pagestyle{fancy} - \fancyhead

Plot size and resolution with R markdown, knitr, pandoc, beamer

社会主义新天地 提交于 2019-11-27 00:01:51
问题 Doesn't fit on the slide by default, doesn't even print by any other means. Here's the .Rmd: Edit: it seems you have to use plot() in every chunk. Second plot now prints. # Plot should show at high resolution ```{r echo=FALSE, comment = ""} # load some data require(plyr) rbi <- ddply(baseball, .(year), summarise, mean_rbi = mean(rbi, na.rm = TRUE)) ``` ```{r} # plot plot(mean_rbi ~ year, type = "l", data = rbi) ``` # Second attempt ```{r, fig.width = 2, fig.height = 2} plot(mean_rbi ~ year,