Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm + shinylive #243

Merged
merged 24 commits into from
May 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
autorun: true; add webR tab
pawelru committed Apr 16, 2024
commit d47bd05bbeaddae42dbf87527fbde04ad40fc94f
25 changes: 25 additions & 0 deletions book/tables/adverse-events/aet01_aesi.qmd
Original file line number Diff line number Diff line change
@@ -845,4 +845,29 @@ shinyApp(app$ui, app$server)
:::

{{< include ../../repro.qmd >}}

## WebR

::: {.callout-warning appearance="simple"}
## Experimental use!
:::

```{r, echo=FALSE, results='asis'}
webr_code_labels <- c("setup", "variant1")
if (!all(webr_code_labels %in% knitr::all_labels())) {
stop(sprintf(
"Not all of provided labels exist in the current document!\nNot found labels are: %s.",
paste0(setdiff(webr_code_labels, knitr::all_labels()), collapse = ", ")
))
}

text <- unlist(c(
"```{webr-r}",
"#| editor-max-height: 500",
"#| autorun: true",
lapply(webr_code_labels, knitr::knit_code$get),
"```"
))
cat(text, sep = "\n")
```
::::
1 change: 1 addition & 0 deletions book/webr.qmd
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ if (!all(webr_code_labels %in% knitr::all_labels())) {
text <- unlist(c(
"```{webr-r}",
"#| editor-max-height: 500",
"#| autorun: true",
lapply(webr_code_labels, knitr::knit_code$get),
"```"
))