r-markdown

pandoc document conversion failed with error 67

假如想象 提交于 2019-12-02 23:33:07
问题 I'm using R 3.3.2 and Rstudio Version 1.0.44, here's the format of my RMarkdown file --- title: "Sentiment Analysis" output: rmdformats::material: highlight: kate --- When I try to knit, I got the following error pandoc: Could not fetch /tabsets.js /tabsets.js: openBinaryFile: does not exist (No such file or directory) Error: pandoc document conversion failed with error 67 In addition: Warning messages: 1: In sink() : no sink to remove 2: In sink() : no sink to remove 3: MathJax doesn't work

Problems when printing lists inside RJournal template code chunks

僤鯓⒐⒋嵵緔 提交于 2019-12-02 22:22:17
问题 I'm using RStudio Version 0.99.896 and trying to compile an article which uses RJournal template (.Rmd). The thing is, whenever I try to compile a simple chunk like ```{r} l = list(a = list(b = c(1,2)), b = c(3,4)) l$a l[[1]]$b ``` i get this awful output (in the .pdf): \begin{Schunk} \begin{Sinput} l = list(a = list(b = c(1,2)), b = c(3,4)) l$a \end{Sinput} \be- gin{Soutput} #> b > [ 1 ] 12 \textbackslash{}end\{Sinput\} \begin{Soutput} > [1] 1 2 \end{Soutput} \textbackslash{}end\{Schunk\}

How can I change paper size when using Knit PDF in RStudio?

╄→гoц情女王★ 提交于 2019-12-02 20:28:58
By default the PDF documents created by the Knit PDF are US Letter size. Instead I would like to create A4 size documents. I have a feeling this should simple to change, either in the RStudio GUI or by adding an option to the metadata at the top of the Rmd file. Unfortunately I can't find any instructions how to do this. Is there a way to specify paper size, preferably within the Rmd file itself? I am still using RStudio version 0.98.953 but can upgrade if it would help. I'd be grateful if someone could point me in the right direction. OK, so I figured it out. In the .Rmd file's header,

Reduce space between code chunks and code output in rmarkdown beamer presentation

泪湿孤枕 提交于 2019-12-02 19:20:39
I'm building a presentation using rmarkdown and LaTeX/Beamer. I would like to reduce the spacing between the displayed R-commands and R-output. I believe this is related to the paragraph spacing options in LaTeX/Beamer. Is this something I should do in rmarkdown (chunk options, knit_hooks, or something else?), in the pandoc Yaml header (some pandoc option?), or in the LaTeX beamer template file? I feel like it should be in the LaTeX template file. Below is a working example of a minimal markdown file, and a .tex template file I'm using to control some beamer settings. example.Rmd --- title:

How to show code but hide output in RMarkdown?

允我心安 提交于 2019-12-02 19:04:28
I want my html file to show the code, but not the output of this chunk: ```{r echo=True, include=FALSE} fun <- function(b) { for(a in b) {print(a) return(a * a)} } y <- fun(b) ``` When I run the code, i need the print to see the progress (it is quite a long function in reality). But in the knitr file, I use the output in a further chunk, so I do not want to see it in this one (and there's no notion of progress, since the code has already been run). This echo=True, include=FALSE here does not work: the whole thing is hidden (which is the normal behavior of include=FALSE ). What are the

RMarkdown and RCharts

♀尐吖头ヾ 提交于 2019-12-02 18:59:34
问题 When I run this RMarkdown code: --- title: "test" output: html_document --- ```{r cache=FALSE} library(rCharts) library(knitr) opts_chunk$set(comment = NA, results = "asis", comment = NA, tidy = F) hair_eye = as.data.frame(HairEyeColor) p2 <- nPlot(Freq ~ Hair, group = 'Eye', data = subset(hair_eye, Sex == "Female"), type = 'multiBarChart') p2$chart(color = c('brown', 'blue', '#594c26', 'green')) p2$show('inline', include_assets = TRUE, cdn = TRUE) ``` I get this: http://rpubs.com/rajesh06

How do I embed images in a list of dataframes?

丶灬走出姿态 提交于 2019-12-02 17:44:03
问题 This is a related question to a post I made a few weeks ago here. I am trying to embed QR codes in a new column in a list of dataframes. The QR code will contain the numerical result from the other column and can be scanned into our lab information system. Thus far i am able to generate a dataframe with a column containing QR codes using RMarkdown, but I can't seem to do it when I try to adapt this code to a list of dataframes. Here is an example of what does what I want with a single

rmarkdown: pandoc: pdflatex not found

北城以北 提交于 2019-12-02 17:23:21
When I use the render{rmarkdown} to produce pdf file from .Rmd file on my Mac, an error message says pandoc: pdflatex not found. pdflatex is needed for pdf output. Error: pandoc document conversion failed However when I check with pdflatex -v I got pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012) kpathsea version 6.1.0 Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named

How to add new line in Markdown presentation?

半世苍凉 提交于 2019-12-02 16:55:31
How to add new line in Markdown presentation? I mean, something like \newline in tex . See the original markdown specification (bold mine): The implication of the “one or more consecutive lines of text” rule is that Markdown supports “hard-wrapped” text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type’s “Convert Line Breaks” option) which translate every line break character in a paragraph into a <br /> tag. When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return. How to add new

How can I use Emacs ESS mode with R markdown?

 ̄綄美尐妖づ 提交于 2019-12-02 16:43:29
Is there a way to configure Emacs so that it recognizes (and allows execution of) R code chunks within R markdown (.Rmd) files similar to the way it recognizes code chunks in .Rnw (Sweave) or .org (org-mode) files? polymode is being developed which does/will allow you to write markdown with R chunks (for processing with knitr ). Instructions for setting up polymode+rmarkdown are in the README It is not yet done, but is progressing. See also this discussion on the ess-help mailing list ( gmane archive | mailing list archive ) Update: polymode has been released on MELPA, simplifying the