How to set size for local image using knitr for markdown?

I have a local image that I would like to include in an .Rmd file which I will then knit and convert to HTML slides with Pandoc. Per this post, this will insert the local image : ![Image...

Simple manual RMarkdown tables that look good in HTML, PDF and DOCX

How can I manually and simply format a table in RMarkdown that will look good when converted to HTML (using the knitr and markdown packages), PDF (using pandoc and miktex) and docx (using...

Why does Pandoc not retrieve the image file?

On RStudio version 0.98.501 I had a long .Rmd file which was easily converted to html once I clicked KnitHtml button. The Knitting process, as I understand, created several folders including...

Manipulate RMarkdown metadata from within R code chunks

In short: Is there a way to manipulate RMarkdown's metadata-list generated from the YAML header from within the following R-code chunks? To illustrate, I've tried the following: --- title:...

add local image file in R presentation

I'm trying to include one imaging file (.png) using R markdown for R presentation. I followed the suggestion from:...

What is a neat command line equivalent to RStudio's Knit HTML?

What is a neat command line equivalent to RStudio's Knit HTML? Given an .Rmd file, you can use RStudio to knit .html, .docx and .pdf files using Knitr. It would be great to shift this process...

Split r chunk header across lines in knitr

When I'm inserting long captions and the like in my R chunk header, it'd be nice to be able to split the header across multiple lines. Is there any easy way to do this? E.g.: ```{r, echo=FALSE,...

Image size control in Rmarkdown pdf generation with latex

I'm using Rmarkdownv2 to generate a pdf file with some local images. But it seems that the image was converted to a larger size with lower resolution in the rendered pdf, compared to the html. The...

Referencing a 'hand-made' table using bookdown package

I'm trying to reference a table using the bookdown package. In the documentation for tables, the author only shows how to create tables using knitr::kable. ```{r table1} knitr::kable( head(iris,...

How to handle HTTP error 503 when making API calls to process JSON files in R with the jsonlite package?

I'm having problems using the JSONlite package in R to collect Dota2 match data using the Steam API. I am not an experienced developer and really appreciate any help. Thanks! I have created a...

Knitr & Rmarkdown docx tables

When using knitr and rmarkdown together to create a word document you can use an existing document to style the output. For example in my yaml header: output: word_document: reference_docx:...

How can I embed a plot within a RMarkdown table?

I am trying to generate a report template in RMarkdown. In this report, I would like a plot in the cell next to the number and text of a question on the survey that I am using. I generated some...

Using python together with knitr

I would like to use python together with knitr. However, python chunks seem to get evaluated separately, and variable definitions are lost between chunks. How to solve this? Minimal...

R/ RStudio - system path issue

I think I did some damage to my system path and now I am unable to knit in RStudio. I have the most current version of R and RStudio. Here is what i'm working...

Difference between R MarkDown and R NoteBook

I am trying to understand at a high level what the differences between R Markdown and R NoteBook. I know they are interrelated but I would like to figure out how they are related. My understanding...

Produce a table spanning multiple pages using kable()

I would like to produce a table that spans over multiple pages using kable(). I know this is possible using xtable() with the "longtable" option, but I need kable() for other features. Any...

How to show code but hide output in RMarkdown?

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 <-...

R Shiny - Scrolling to a given row of datatable with javascript callback

I am running into an issue with datatables and shiny, specifically within a flexdashboard but I think that is irrelevant. I want to scroll to a given row in the datatable when I click on the...

DiagrammeR mermaid: inconsistent results in rmarkdown ioslides

I have a rmarkdown presentation (ioslides) with 3 slides with flow diagrams worked in DiagrammeR's mermaid. The following file saved as .Rmd can reproduce the example (at least in my machine,...

Miktex did not succeed after I updated R to version 3.5.0

After I updated R to version 3.5.0, I couldn't start my MikTex from Rstudio, --- output: pdf_document: latex_engine: xelatex includes: in_header: header.tex keep_tex:...

Leaflet html widget (sparkline) in popup

Popups and labels reportedly can have arbitrary html as their content. I would like to add eg a sparkline to a popup or label in leaflet using R, hopefully without needing to learn javascript. I...

RStudio + Knitr + mind mapping

I am trying to integrate mind mapping using tikz library into rstudio code. But am getting an error: improper \prevdepth missing \endgroup inserted. Here is the piece of code. ` % mind mapping...

Rmarkdown: change default font size for code (Powerpoint output)

When knitting an Rmarkdown document to Powerpoint, I do not understand why by default the inline code (or chunks code) is rendered in the presentation in font Courier size 18pt, whereas the rest...

Rmarkdown not working on Win 10 machine: openBinaryFile: does not exist (No such file or directory)

I am not able to knit html, pdf, or word. Same error each time: "C:/Users/bosr/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to docx --from...

How to save html output in Rmarkdown

This is the first time I am using rmarkdown to knit a document into an html output. I see the output as an html document, no problem. However the output is linked to my personal working directory...

Error in loadnamespace when knitting R_markdown to PDF

This is the first time I use R_Markdown I created a new R_Markdown and am trying to knit it to PDF. When I do it I get the following error processing file: R_markdown.Rmd |.......... ...

Rmarkdown photo gallery

Anyone know of any photo gallery packages for Rmarkdown or a good way to create a gallery? I have just started to experiment with some vanilla code, but there is a long way to go. Just wanted to...

accessing the original file name of r markdown parameters file

I want to provide the user a convenient way to define the input file. For this I am using the parameters functionality in markdown. If I "knit with parameters" I get asked for the input file. Is...

How to fix the problem when I get "File not found in resource path" error?

When I run knit in my rmarkdown document, it seems to work at first but eventually the following error message shows up. output file: paper-1_revised.knit.md File not found in resource...

CARET xgbtree warning: `ntree_limit` is deprecated, use `iteration_range` instead

cv <- trainControl( method = "cv", number = 5, classProbs = TRUE, summaryFunction = prSummary, seeds = set.seed(123)) turn_grid_xgb <- expand.grid( eta = c(0.1,0.3,0.5), max_depth =...