-
-
Save baptiste/ddd8fe83f9413001bb96e56178181dff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{r} | |
path <- fs::path("<<variable>>", ext = "csv") | |
cmd <- paste0("{{< downloadthis ", "'", path, "'", ' dname=<<variable>> label="Download the <<variable>> data" icon=database-fill-down type=info class=data-button id=<<variable>> >}}') | |
``` | |
```{r} | |
#| results: asis | |
cat(cmd) | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "testchild.qmd" | |
format: html | |
extension: downloadthis | |
--- | |
## Quarto | |
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>. | |
```{r} | |
#| results = "asis" | |
variable <- 'dudewhereismy' | |
src = knitr::knit_expand("child.qmd", delim = c("<<", ">>")) | |
res = knitr::knit_child(text = unlist(src), quiet = TRUE) | |
cat(res, sep = '\n') | |
``` |
Author
baptiste
commented
Feb 9, 2023
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment