As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [r-markdown]

R Flavored Markdown or "R Markdown" is a markdown variant used for content-creation and/or programming documentation interleaved with R code.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

kableExtra vs. huxtable for LaTex: is there a clear winner in 2023? [.Rmd]

I see several recent enhancements to the kableExtra package, but a features comparison table at huxtable benchmark suggests that kableExtra is not be the best option for generating LaTex tables while ...
Dan's user avatar
  • 1,671
0 votes
0 answers
4 views

Sparklines inside Table in R Markdown

I'm using kableExtra and ultimately I want to render it as a pdf in R Markdown. In trying to add sparklines/histograms, I tried: library(kableExtra) mpg_list <- split(mtcars$mpg, row.names(mtcars)) ...
R Walser's user avatar
  • 330
0 votes
1 answer
23 views

How to iterate over individual and merged values in an R for loop function?

I am producing reports across a number of individual departments using a for loop similar to the below: report_loop <- function() { pacman::p_load(tidyverse) df1 <- data.frame(Dept = c(...
rollingstone's user avatar
0 votes
0 answers
44 views

error running knitr kable with .pdf output after updating Rstudio

I've updated r (4.3.0) and Rstudio (RStudio 2023.03.1 Build 446) and when I tried to run knitr with .pdf output (knitr to pdf) on an rmarkdown (.rmd) document I get an unexpected error when rendering. ...
José Carlos's user avatar
0 votes
0 answers
13 views

R Markdown: Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object

I'm having this error when I try to knit any r markdown file in rstudio. I even tried it with the default empty file, but it doesn't work. The output is this error: Error in inDL(x, as.logical(local), ...
moritzhatkbm's user avatar
0 votes
0 answers
13 views

R pandoc cannot compile a poster with posterdown

I am trying to compile a poster with posterdown. It was working about a week ago, and I tried removing the text I added in between to see if that was the issue, but it doesn't appear to be. Below is ...
Rosalie Bruel's user avatar
0 votes
0 answers
15 views

How to show block of markdown when knitting to HTML, but not when output format is PDF?

I am creating a report which I want to render to HTML and PDF, depending on the command I choose from RStudio (Knit to PDF, Knit to HTML). A chapter should contain a datatable, which should be ...
Joysn's user avatar
  • 955
2 votes
1 answer
33 views

Embedding \sigma (or \mu) into R-Markdown quiz question

I am trying to render the Greek sigma notation within a Quiz in R Markdown. If I use dollar signs, it only italicizes the word \sigma. If I use <span class="math inline">\sigma</...
AMH's user avatar
  • 23
0 votes
0 answers
32 views

RMarkdown: Euro symbol not shown on ggplot geom_text and axis text when knitting to PDF

I use RStudio 2023.03.01 on Linux Mint (Debian edition bullseye/11.2) to write some reports in r-markdown. When the rendering in RStudio is done, the € symbol is shown on the gglot2 plots. But when I ...
Joysn's user avatar
  • 955
0 votes
1 answer
53 views
+50

Apply slide specific CSS in ioslides_presentation on specified div classes only

How can I change the h2 header stiles for specific slides only? Excuse me if this a dumb question, I have no experience in CSS (yet). I want to create a html presentation using rmarkdown and ioslides. ...
user12256545's user avatar
  • 2,392
0 votes
1 answer
38 views

creating figures for table & graphs linkable

I have been trying to make a results page that meets American Chemical Society standards for my chemistry class. I have tried different methods but they aren't exactly what I am looking for. Does ...
Jakiepoo21's user avatar
0 votes
0 answers
25 views

Issues Rendering Rmarkdown PDF from second R script (Windows)

I have successfully created a .rmd file and an associated Rscript that renders the .rmd. The goal of this set up is so that I can automatically create PDF reports by scheduling the .R file to run ...
zmcclean's user avatar
-1 votes
0 answers
16 views

Why is pdflatex.exe failing to compile my R Markdown file for PDF output?

hey guys im after some help on r markdown on R studio. Please help me overcome this issue as its been bugging me all day. thanks output file: samig.knit.md ! Sorry, but C:\Users\samih\AppData\Local\...
samboy1242's user avatar
0 votes
1 answer
18 views

How to avoid an error running a simple yaml header?

Can somebody please tell me what I am doing wrong to have a header in my html rmarkdown output? I have searched a lot and everywhere there is the below code as solution. But I get the error below. --- ...
Rara's user avatar
  • 67
0 votes
0 answers
18 views

Magritte pipelines in Rmarkdown go unnecessarily know in R Studio 2023.03.1 Build 446

I use two computers. In the first I have this version, in another a older one. When I use this version, whatever I code within a chuck, execution of the chunk will involve R Studio slowly reading each ...
GiulioGCantone's user avatar
0 votes
0 answers
13 views

How can I combine Rmarkdown/Bookdown with external pdfs into a comprehensive document?

Is it possible to insert an external pdf between chapters in a bookdown projects? I've found solutions to insert external pdfs at the beginning or end of a project. I also found a solution to ...
apax's user avatar
  • 160
0 votes
0 answers
23 views

Possible to print() a 100 x 2 tibble side by side in R markdown (pdf)?

I've got a 100 x 2 df. I'm working in R markdown (knitting to PDF). I need to print() the entire df, but I'd like to use column breaks so it prints neatly on a single page. A similar question's ...
RKeithL's user avatar
  • 157
0 votes
0 answers
36 views

Contents of the line rmarkdown unformatted latex pdf

I need to wrap the contents of the line marked in red. The content of this row is too large. the output of this content is in pdf ```{r tabela1, echo=FALSE, include=F, fig.pos='H'} tabela1 = ...
Francisco Ribeiro's user avatar
0 votes
0 answers
8 views

RMarkdown error package/namespace failed to load [duplicate]

my rMarkdown doc was working just fine and now it won't knit--I don't know what changed to cause the error. > Error: package or namespace load failed for 'kableExtra': onLoad failed in ...
Evelyn Jenkins's user avatar
0 votes
0 answers
18 views

R markdown add chart and text to pane

I am trying to create an R markdown page which includes in the panes both a chart and some supporting text, the code I am using to do this is as below --- title: "Untitled" output: ...
Nick Read's user avatar
0 votes
1 answer
25 views

ggplotly does not display within an html document

I want to write an html_document where the reader can select different versions of a graph. I want to use ggplotly so the reader can hover over points and see their labels and so forth. The ggplotly ...
DashdotdotDashdotdot's user avatar
0 votes
1 answer
21 views

Add custom code before each top-level heading in R markdown

I have an R Markdown document in which every top level heading needs the same five lines of code before it to make the formatting nice. I want to know if I can set these five lines in a style.css or ...
roblanf's user avatar
  • 1,731
0 votes
0 answers
18 views

tmap title on wrong graphic

I wonder if this is a bug in tmap while using tmap_mode("view"). I want a title to appear on the last graphic but instead the title is put on the third graphic. The tmap_("plot") ...
Salvador's user avatar
  • 1,167
1 vote
0 answers
23 views

How can I customize page sizes in Quarto's docx output to have different dimensions for individual pages in R?

I am using Quarto in R to generate a docx output. However, I would like to have different page sizes (width and height) for individual pages, allowing me to customize the dimensions according to my ...
Abdullah Abdelaziz's user avatar
0 votes
0 answers
26 views

How do I add a pop-up window in R Markdown that shows a message when I do file selection?

Right now in my R Markdown I use: source(file.choose()) to select which file to input. However, I would like to add a pop up window or somehow incorporate a message in the console that appears so that ...
kakeysword's user avatar
2 votes
2 answers
66 views

How to achieve code reusability in Quarto Markdown (qmd) similar to R Markdown's chunk reusability?

I am attempting to render Quarto markdown (qmd), and in my qmd file, I aim to reuse a code chunk multiple times. Specifically, I wish to execute a code cell with the label label: package-import ...
Carlos Luis Rivera's user avatar
0 votes
0 answers
37 views

python code in bookdown Rmarkdown does not run

I am trying to run some python code in rmarkdown using bookdown by copying this github repo - https://github.com/rstudio/bookdown-demo. Everything looks ok when I knit the book either in HTML or PDF. ...
Sharif's user avatar
  • 141
0 votes
0 answers
9 views

Rmarkdown, ggplotly + flexdashboard: problems with geom_vline

I'm designing an flexdashboard output using ggplotly with geom_vline. With the next code, I can view the plot as I need: library(openair) library(tidyverse) library(plotly) aq <- importAURN(site = ...
Camilo Montes's user avatar
0 votes
0 answers
19 views

Changing Table Height with huxtable Package in R Markdown

I want to decrease the height of a table to half of its size. I tried to use the function height and row_height it did not work. If I decrease the font size and set all padding to zero it helps but ...
user3087336's user avatar
-1 votes
1 answer
46 views

Python Code and Output in Bookdown pdf are not in multiple lines

I am trying to write python code using rmarkdown in bookdown. The python code is ok. The problem is when the book pdf is generated, some long python codes and sometimes some python codes' output are ...
Sharif's user avatar
  • 141
2 votes
1 answer
34 views

Automating the creation of Rmarkdown/Xaringan Presentation slides

I have over 500 images i will like to display on a screen with some text ( image names etc). the slide format for each image will be the same. Is it possible to automate the creation of individual ...
Hammao's user avatar
  • 781
0 votes
1 answer
13 views

RMarkdown: Header Summary/Overview in RStudio?

I have a long RMarkdown file that is organized with Headings. Scrolling through to find a Heading of interest has become time consuming. Is there a way to display a summary/overview of all Headings in ...
JVGen's user avatar
  • 313
0 votes
1 answer
27 views

Can I print the date object into the flexdashboard title?

I do not know whether there is a way to print a date object that appears into one of the '''r ''' chuncks in flexdashboard. this is the flexdashboard title: --- title: 'r param$title output: ...
GaB's user avatar
  • 1,054
0 votes
1 answer
19 views

Knitting R notebooks with iframe tags instead of embed?

Since last year (at least), Safari has been very unreliable in rendering PDFs plots in R Markdown HTML notebooks. The notebook HTML files are interpreted with an empty gray box where the PDF plot ...
Ricardo A.'s user avatar
0 votes
1 answer
25 views

**gt** will not format column labels in Word output

Example (gt 0.9.0, R 4.3.0): column labels for gt table should be bold, but are not. library(gt) res <- gt(mtcars) %>% tab_style(locations = cells_column_labels(), style = cell_text(weight = &...
cgmil's user avatar
  • 411
0 votes
1 answer
34 views

Running javascript in R markdown - cannot import library

I am trying to import the javascript MSAL library into an rMarkdown script so that I can use it to obtain an oauth token for a db connection. The first script called is to import the msal library. And ...
Dieu94's user avatar
  • 357
1 vote
1 answer
24 views

exams::tex2image failing to compile with no logs

I'm trying to compile a R Markdown file that uses exam::tex2image to generate an image from a Latex equation. Unfortunately the compilation fails, the error message talks about a log file which doesn'...
robertspierre's user avatar
1 vote
0 answers
35 views

Error in : pandoc document conversion failed with error 99

I have deployed my shiny app, and it is properly working on my local computer but when I deployed it to shiny.io, I am receiving this error: Error in : pandoc document conversion failed with error 99. ...
Melih Aras's user avatar
0 votes
1 answer
37 views

Border around Markdown embed in RMarkdown

I have a couple of Github profile "cards" created from here which I am embedding as Markdown in a RMarkdown page on a pkgdown website. How would i go about adding a border to these? Anything ...
hokeybot's user avatar
  • 185
0 votes
0 answers
22 views

I am not sure how to address this execution halted error in knitting rmarkdown file to pdf

I've been trying to knit this rmarkdown file, however this "execution halted" message appears. I'm new to rstudio/rmarkdown, and I'm not entirely sure what this means, nor how to fix it. Can ...
Eunice Choi's user avatar
1 vote
1 answer
47 views

Bookdown - conditional display of text and code blocks (LaTeX/PDF vs. HTML)

I am using R markdown (Bookdown) and want to accomplish the following: ## Section This is some text. I want this to be visibile in Bookdown/HTML but not in Bookdown/PDF Also in-line statements ...
heoof123's user avatar
0 votes
1 answer
13 views

Is there a way to pass a URL to options in rmarkdown header?

My team has used custom css and html documents to generate branded reports from rmarkdown documents. Within our team we have a shared file structure, and so we've been using absolute paths to the ...
Geoff's user avatar
  • 23
0 votes
0 answers
47 views

Problem with image kable extra r markdown

I'm generating a document with pdf output using rmarkdown. This document contains a column where I am inserting images. The image is inserted correctly, but it comes with the value described in the ...
Francisco Ribeiro's user avatar
0 votes
0 answers
9 views

Have flexdashboard knit to another file directory

I am working with the flexdashboard package in R. I would like to have the rmd file knit to another file directory - one that is different from where the RMD is stored. I tried creating an R script ...
z_11122's user avatar
  • 143
0 votes
1 answer
21 views

How do I convert bibtex citation commands into R markdown format in R?

I have a dataframe in R, one column of which contains bibtex citation commands, such as the following \\cite[265]{delbarrio2014a}, \\cite[423--429]{nieto2009}, \\cite[188, 191, 196--197]{bile1988a}, \\...
Namenlos's user avatar
  • 475
0 votes
1 answer
37 views

R Markdown - Object of dataframe not found even though object is in Global Environment pane [duplicate]

I am new to "R" and I am trying to create a R Markdown file. In the environment pane, my dataframe is names "crimes". In the code chunk area, I've tried View(crimes) and I ...
J Welch's user avatar
0 votes
0 answers
12 views

Graphs that executed fine in Rstudio aren't working on Kaggle. Why?

I have previously run the below code in Rstudio without any problem. You can check out the whole notebook here. Here is the code that is not working on Kaggle: pie_type_user <- data.frame(...
Bill_Stevenson1968's user avatar
0 votes
1 answer
38 views

Is it possible to set tbl-colwidth property in Quarto document for LaTeX output on per table basis?

I am creating a Quarto document in R. The output is a LaTeX document (document class: scrbook). The problem I am facing is that I have some tables in the document, which has long content in the first ...
Eva's user avatar
  • 631
1 vote
1 answer
67 views

Cannot publish an RMarkdown HTML due to MASS package related problem

I generated an HTML file with RMarkdown. Then, I connected to Posit cloud. However, after clicking the button "Publish" and selecting the option of publishing the document on Posit Cloud, I ...
Santiago's user avatar
0 votes
1 answer
22 views

Heatmaply not showing in R Viewer or Markdown, but does load when pressing "show in new window"

I have a heatmaply graph with almost 800 data points. When I run the plot, it will not show up in the R Viewer unless I click on "show in new window". Then it will display correctly in my ...
ooverbee's user avatar

1
2 3 4 5
206