GESIS-Methods-Hub / andrew

Content Aggregation System for tutorials and vignette of reproducible computational methods.
https://gesis-methods-hub.github.io/andrew/
MIT License
2 stars 0 forks source link

Code output of R Markdown and Quarto are different #84

Closed rgaiacs closed 1 year ago

rgaiacs commented 1 year ago

R Markdown

Screenshot 2023-07-13 at 16-34-11 Demo of MethodsHub - Minimal Example of Tutorial as R package vignette

Quarto

Screenshot 2023-07-13 at 16-34-40 Demo of MethodsHub - Minimal Example of Tutorial in Markdown with R

rgaiacs commented 1 year ago

Consider the mwe.Rmd:

---
title: MWE
author: Raniere
---

Foo

```{r}
1 + 1

Bar


`Rscript -e "rmarkdown::render('mwe.Rmd', rmarkdown::md_document())"` produces

Foo

1 + 1

## [1] 2

Bar


`Rscript -e "rmarkdown::render('mwe.Rmd', rmarkdown::md_document(variant='commonmark'))"` produces

Foo

1 + 1
## [1] 2

Bar


`Rscript -e 'library(knitr); knitr::opts_chunk$set(comment = NA); rmarkdown::render("mwe.Rmd", rmarkdown::md_document(variant="commonmark"))'` produces

Foo

1 + 1
[1] 2

Bar

rgaiacs commented 1 year ago

The issue is on pkgdown and I didn't find a easy way to pass the arguments down stream.