r-markdown

How do I embed images in a list of dataframes?

本小妞迷上赌 提交于 2019-12-02 10:11:46
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 dataframe: --- title: "QR Code in Column" author: "dorton" date: "2019/01/20" output: pdf_document --- ```{r

Problems when printing lists inside RJournal template code chunks

天涯浪子 提交于 2019-12-02 10:07:00
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\} \textbackslash{}begin\{Schunk\} \begin{Sinput} I don't even have to use the problematic $ (dollar sign)

How to get images from the .tex folder (relative path) in Rmarkdown?

对着背影说爱祢 提交于 2019-12-02 09:46:25
I'm trying to get a watermark image like here: How to add a watermark image on rmarkdown? I almost did it, but as I wrote on my original question the background.png image that the \includegraphics get comes from C:\Program Files (x86)\MiKTeX 2.9\tex\plain\present I'm currently using my Latex code from an external file using the follwing at beginning of my .Rmd: output: pdf_document: includes: in_header: header.tex And in header.tex I'm using the following code: \usepackage{eso-pic,graphicx,transparent} \AddToShipoutPictureFG{ \put(0,0){% \parbox[b][\paperheight]{\paperwidth}{% \centering {

How to base the Output file name and sub title on user input using params

对着背影说爱祢 提交于 2019-12-02 09:36:52
What does Work I am able to make the subtitle of my pdf file dynamic based on user input. I am also able to generate a 'semi-dynamic' file name using the subtitle field from the YAML (the working code is given below) What doesn't Work However I am not able to do both, being a subtitle and output file which are based upon the users input. As rmarkdown::yaml_front_matter(inputFile)$title does work I tried to use rmarkdown::yaml_front_matter(inputFile)$subtitle however it seems to have the unevaluated r-code. A long shot was rmarkdown::yaml_front_matter(inputFile)$params$sub_title but that

Include TeX header in R package for RMarkdown documents

北城以北 提交于 2019-12-02 09:15:49
问题 I want to create an R package containing a latex header file which would then be available from an RMarkdown document to create a PDF with slides via TeX. When I include a reference to the latex file in the header of the RMarkdown document, I can create my slides. But I do not know how to package it. So my two related questions are: How can I put a LaTeX-file in an R package so that it can be accessed later? How can I include the LaTeX file in a new RMarkdown document to create slides after

Generating view of cache object in Markdown document in R

限于喜欢 提交于 2019-12-02 08:55:42
I cannot show object in markdown document that are objects generated in different R script(within the same session). I would like to point out that I am newbie to markdown. So the code is as follows(''' are added before and after): {r eval=TRUE, echo=FALSE} head(output_by_size,10) # 1st line summary(cars) # 2nd line dim(iris) # 3rd line when I comment line 2nd and 3rd the following error is generated: Error in head(output_by_size, 10) : object 'output_by_size' not found Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> head When 1st line is commented, lines 2nd and 3rd work as

pandoc document conversion failed with error 67

巧了我就是萌 提交于 2019-12-02 08:26:19
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 with self_contained when not using the rmarkdown "default" template. Execution halted I read some

run an R Markdown (check.Rmd ) and an R knitr (test.Rnw ) file together

你说的曾经没有我的故事 提交于 2019-12-02 08:01:36
问题 I have the following problem; There are 2 big documents, one written in R Markdown (check.Rmd ) and the other in R knitr (test.Rnw ). In the first doc we have a code like the following: \section{Organisations Test} \textbf{Running Organisations Checks} <<CreateOrganisations, echo=FALSE, progress=TRUE, warning=FALSE, eval=TRUE>>= source("OrganisationsTest.R") OrganisationsTest(current_schema,server,user,pass) @ and in the other as follows: 2. check the downwards shock ```{r chunk_Int_Sh_p2,

Changing *Chapter X* name in bookdown PDF

情到浓时终转凉″ 提交于 2019-12-02 07:43:56
问题 Instead of Chapter X when creating a PDF from bookdown, I would like it to be "Módulo X" (in Spanish). So I would like to know how to change chapter name using bookdown. My YAML is: --- title: "TITLE" author: "Mario Modesto-Mata" date: "`r Sys.Date()`" output: pdf_document description: This is a minimal example of using the bookdown package to write a book. The output format for this example is bookdown::gitbook. documentclass: book link-citations: yes bibliography: book.bib site: bookdown:

Changing *Chapter X* name in bookdown PDF

大兔子大兔子 提交于 2019-12-02 07:15:24
Instead of Chapter X when creating a PDF from bookdown, I would like it to be "Módulo X" (in Spanish). So I would like to know how to change chapter name using bookdown. My YAML is: --- title: "TITLE" author: "Mario Modesto-Mata" date: "`r Sys.Date()`" output: pdf_document description: This is a minimal example of using the bookdown package to write a book. The output format for this example is bookdown::gitbook. documentclass: book link-citations: yes bibliography: book.bib site: bookdown::bookdown_site language: label: chapter_name: "Módulo" --- I tried with the last three line codes, with