https://github.com/jbryer/WebRBookTemplate
Template for Quarto Book Sites with WebR Package Support
https://github.com/jbryer/WebRBookTemplate
Last synced: 3 months ago
JSON representation
Template for Quarto Book Sites with WebR Package Support
- Host: GitHub
- URL: https://github.com/jbryer/WebRBookTemplate
- Owner: jbryer
- License: gpl-3.0
- Created: 2024-05-27T00:19:11.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-28T21:15:00.000Z (over 1 year ago)
- Last Synced: 2025-04-03T23:14:40.192Z (7 months ago)
- Language: Lua
- Size: 30.6 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - jbryer/WebRBookTemplate - Template for Quarto Book Sites with WebR Package Support (Lua)
README
---
output: github_document
editor_options:
chunk_output_type: console
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# WebRBookTemplate
[](https://github.com/jbryer/WebRBookTemplate/actions/workflows/R-CMD-check.yaml)
[](https://github.com/jbryer/WebRBookTemplate/actions/workflows/deploy-cran-repo.yml)
[](https://github.com/jbryer/WebRBookTemplate/actions/workflows/build-site.yaml)
This repository is adapted from this repo: https://github.com/coatless-tutorials/webr-github-action-wasm-binaries/tree/main
The goal of this repository is to:
1. Be an R package containing functions and data that will be used for a...
2. Quarto book site.
3. Make the package available as a [webR](https://docs.r-wasm.org/webr/latest/) package. Specifically, the Quarto book site will included embedded Shiny applications using the [`shinylive-r`](https://github.com/coatless-quarto/r-shinylive-demo) Quarto extension. To provide maximum flexibility, Shiny applications are implemented in the R package. See [loess_shiny.R](R/loess_shiny.R) for example. This way, the Shiny application can be...
* Run locally using the `loess_shiny()` function.
* Deployed to any Shiny server by creating an `app.R` file that calls this function (see [inst/loess_shiny/app.R](inst/shiny/app.R) for example).
* Be embedded within a Quarto page using `shinylive` (i.e. no server required).
## Installation
You can install the development version of WebRBookTemplate like so:
```{r, eval=FALSE}
remotes::install_github('jbryer/WebRBookTemplate')
```
## Building Package Locally
```{r, eval=FALSE}
usethis::use_package('dplyr')
usethis::use_tidy_description()
devtools::document()
devtools::install()
devtools::check()
```
## Using the package
### Loess Visualization
```{r, eval=FALSE}
library(WebRBookTemplate)
data("faithful")
WebRBookTemplate::loess_vis(formula = eruptions ~ waiting, data = faithful)
```
### Loess Shiny Application
```{r, eval=FALSE}
WebRBookTemplate::loess_shiny()
```