-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,11 @@ Global shinylive configuration is available in the `_quarto.yaml` file. | |
|
||
Modify the code below and run it to see the results. | ||
|
||
<!-- | ||
we have to put some code upfront | ||
- need to setup repos on r-universe - currently it's not possible to setup this elsewhere (e.g. shinylive config or chunk attribute) | ||
- currently shinylive is using [email protected] which is missing a feature of shimming `library()` calls - need to add this manually | ||
--!> | ||
```{r shinylive-constructor, echo=FALSE, results='asis'} | ||
text <- unlist(c( | ||
"```{shinylive-r}", | ||
|
@@ -25,8 +30,6 @@ text <- unlist(c( | |
"if (packageVersion(\"webr\") < \"0.3.0\") {", | ||
" .e <- as.environment(\"webr_shims\")", | ||
" .e[[\"library\"]] <- function(pkg, ...) {", | ||
" # https://github.com/quarto-ext/shinylive/issues/48", | ||
" # simplified copy of webr::library_shim from the higher version of webr package", | ||
" package <- as.character(substitute(pkg))", | ||
" if (length(find.package(package, quiet = TRUE)) == 0) {", | ||
" webr::install(package)", | ||
|