Skip to main content

Questions tagged [knitr]

knitr is an R package for dynamic report generation based on the concept of literate programming.

1 vote
2 answers
29 views

Adding tooltips or popovers to table generated with `kableExtra` in an R quarto document

I want to add tooltips or popovers to HTML tables in Quarto, but got stuck, after reading the documentation and considerable trial and error. Links work as expected, but tooltips or popover messages ...
tpetzoldt's user avatar
  • 5,763
0 votes
0 answers
28 views

Collapse messages and text output and add a scrollbar to chunk output when writing vignettes in Rmd

I'm writing vignettes on RStudio using Rmarkdown and knitr for an R package that I'm developing. In one chunk, I'd like to demonstrate the operation of a function I wrote and show its output. ...
Giomu's user avatar
  • 1
0 votes
1 answer
33 views

Issue with Knitting RMarkdown Files After Updating R and RStudio: Error in comment_chars[[engine]] %||% "#"

After installing the new version of R and RStudio, there is an issue with knitting rmd files. I tried to knit even the rmd that appears automatically when you select the creation of a new rmd file in ...
Kώστας Κούδας's user avatar
0 votes
1 answer
38 views

knit and by chunk execution have different results in R Markdown

I work in RStudio, creating an R Markdown document that outputs some tables with metrics. When I clear everything from the global environment and execute the chunks one by one, I have valid results. ...
Stefan Nicov's user avatar
2 votes
0 answers
30 views

Rmarkdown finds image when run but not when "knit"

I'm trying to include a figure in an RMD pdf with this code: knitr::include_graphics(paste0(here::here(), '/figures/species/', cur_yr,'/place_fig1_', cur_yr, '.png'), dpi = 125). This figure ...
cohonomad's user avatar
1 vote
1 answer
47 views

Add code to HTML header in Quarto without modifying the preamble

I am writing an R package which needs to add JavaScript functions to the <head> of an HTML file created by Rmarkdown or Quarto. I do not have control over the YAML preamble, so I cannot use ...
Vincent's user avatar
  • 17.3k
1 vote
2 answers
42 views

Using greek letters for x-axis labels in ggplot

I want the x-axis labels "beta", "gamma" and "sigma" in the ggplot to be in Greek letters. library(sensitivity) library(boot) library(ggplot2) library(knitr) library(...
Jaydy's user avatar
  • 11
0 votes
1 answer
40 views

kableExtra is turning embedded html into escaped text

I am creating a html page in knitr. However, kableExtra is turning embedded html into escaped text. Here is a MWE for the issue. --- title: "Animals" output: html_document: toc: TRUE ...
lilster's user avatar
  • 931
0 votes
0 answers
14 views

Rmarkdown to pdf fails to render, giving LaTeX Error: Command \numberwithin undefined. Has anyone seen this problem and solved it?

I can no longer use RMarkdown to render pdfs. Rmarkdown continues to render to HTML and Word. I am working in Windows 11 and RStudio 2023.12.1 Build 402. R version 4.2.2 (2022-10-31 ucrt) Platform: ...
Kevin Little's user avatar
0 votes
0 answers
31 views

knit button error - '\U' backslash error Rstudio

I am taking the GDAC coursera class on R and I am getting this error specifically when pressing the "knit" button that creates an html/pdf/word file in Rstudio desktop. Error: '\U' used ...
Josh Olson's user avatar
2 votes
0 answers
45 views

how to automatically align arabic text in R-Markdown document and tables

I'm currently working on a bilingual Arabic and English report using xelatex engine. I've included these in my R-Markdown YAML header so that arabic letters combine properly to create a word. --- ...
Abdu Kikhia's user avatar
0 votes
0 answers
32 views

I have been struggling to knit my project in rstudio, neither PDF, word, HTML or tinytex are working

Rmarkdown file is not knitting, I am continously getting this error code. processing file: cyclistic-bike-share-analysis---r-markdown-save.Rmd |. | 2% [...
Ladi's user avatar
  • 1
0 votes
0 answers
21 views

! there is no package called 'XLConnectJars'

I'm knitting an older file in R Markdown. Why am I getting this when the compiler hits this chunk: install.packages( 'printr', repos = c('https://yihui.r-universe.dev', 'https://cran.rstudio.com') ...
Douglas Jones's user avatar
2 votes
0 answers
43 views

R Markdown file with chunks already evaluated, not sure where this is being stored

I have been working with a .Rmd file that now when I open it in RStudio, the chunks are already evaluated. I have not used the cache argument anywhere in the document, and am unsure where/how the ...
setophaga's user avatar
  • 445
1 vote
0 answers
49 views

How do I knit a Rmd file to HTML?

I have a Rmd file open in Rstudio that I am trying to knit into html. These are the first lines of the file: --- title: "Project 2" author: "do not enter your name" date: "...
student123's user avatar

15 30 50 per page
1
2 3 4 5
358