Skip to content

Commit a7664b0

Browse files
committed
Wordsmithing & Syncing documents.
1 parent 76cd1fa commit a7664b0

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

README.md

+16-14
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Let's dive in!
1616

1717
## Sample App
1818

19-
We'll be walking through the process of creating the following R ShinyLive application.
19+
We'll be walking through the process of creating the following R Shinylive application.
2020

2121
![Example of the Shinylive app running in a Quarto HTML Document](images/demo-r-shinylive-app-inbrowser.gif)
2222

2323
You can see the live version built from the repository here:
2424

2525
<https://coatless-quarto.github.io/r-shinylive-demo/>
2626

27-
# Using r-shinylive for Static Shiny Apps in Quarto Documents
27+
# Using r-shinylive for Serverless Shiny Apps in Quarto Documents
2828

2929
Are you interested in creating your own Quarto document with embedded static Shiny apps? This tutorial will guide you through the process of using the `r-shinylive` R package to achieve just that. Let's get started!
3030

@@ -76,9 +76,7 @@ filters:
7676
- shinylive
7777
```
7878
79-
**Step 5:** Place your Shiny application code within your Quarto file (`.qmd`) as shown in the following example:
80-
81-
You can insert the code for a Shiny application in a code block marked with `{shinylive-r}`. Below is a skeletal example of how your code block might look:
79+
**Step 5:** You can insert the code for a Shiny application in a code block marked with `{shinylive-r}`. Below is a skeletal example of how your code block might look:
8280

8381
````md
8482
---
@@ -119,7 +117,6 @@ With this in mind, let's use Joe's shiny app inside our code block. So, we'll en
119117
#| standalone: true
120118
#| viewerHeight: 600
121119
library(shiny)
122-
library(bslib)
123120
124121
# Define UI for app that draws a histogram ----
125122
ui <- page_sidebar(
@@ -140,8 +137,14 @@ server <- function(input, output, session) {
140137
})
141138
142139
output$plot <- renderPlot({
143-
hist(data(), breaks = 40, xlim = c(-2, 2), ylim = c(0, 1),
144-
lty = "blank", xlab = "value", freq = FALSE, main = ""
140+
hist(data(),
141+
breaks = 40,
142+
xlim = c(-2, 2),
143+
ylim = c(0, 1),
144+
lty = "blank",
145+
xlab = "value",
146+
freq = FALSE,
147+
main = ""
145148
)
146149
147150
x <- seq(from = -2, to = 2, length.out = 500)
@@ -154,8 +157,10 @@ server <- function(input, output, session) {
154157
155158
legend(legend = c("Normal", "Mean", "Sample mean"),
156159
col = c("black", "red", "blue"),
157-
lty = c(1, 2, 1), lwd = c(1, lwd, lwd),
158-
x = 1, y = 0.9
160+
lty = c(1, 2, 1),
161+
lwd = c(1, lwd, lwd),
162+
x = 1,
163+
y = 0.9
159164
)
160165
}, res=140)
161166
}
@@ -165,10 +170,7 @@ shinyApp(ui = ui, server = server)
165170
```
166171
````
167172

168-
You can view a standalone version of Joe's app here:
169-
170-
<https://github.com/coatless-quarto/r-shinylive-demo/blob/main/joe-cheng-r-shinylive.qmd>
171-
173+
You can view a standalone version of Joe's app here: [R-shinylive-demo.qmd](https://github.com/coatless-quarto/r-shinylive-demo/blob/main/R-shinylive-demo.qmd)
172174

173175
## Rendering Your Quarto Document
174176

index.qmd

+4-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For the demo, we're showing the source code used in Joe Cheng's [posit::conf(202
1818

1919
## Sample Application
2020

21-
We'll be walking through the process of creating the following R ShinyLive application. Please be aware that it may take some time to load.
21+
We'll be walking through the process of creating the following R Shinylive application. Please be aware that it may take some time to load.
2222

2323
```{shinylive-r}
2424
#| standalone: true
@@ -77,7 +77,7 @@ server <- function(input, output, session) {
7777
shinyApp(ui = ui, server = server)
7878
```
7979

80-
# Tutorial: Using r-shinylive for Static Shiny Apps in Quarto Documents
80+
# Using r-shinylive for Serverless Shiny Apps in Quarto Documents
8181

8282
Are you interested in creating your own Quarto document with embedded static Shiny apps? This tutorial will guide you through the process of using the `r-shinylive` R package to achieve just that. Let's get started!
8383

@@ -129,9 +129,7 @@ filters:
129129
- shinylive
130130
```
131131
132-
**Step 5:** Place your Shiny application code within your Quarto file (`.qmd`) as shown in the following example:
133-
134-
You can insert the code for a Shiny application in a code block marked with `{shinylive-r}`. Below is a skeletal example of how your code block might look:
132+
**Step 5:** You can insert the code for a Shiny application in a code block marked with `{shinylive-r}`. Below is a skeletal example of how your code block might look:
135133

136134
````md
137135
---
@@ -225,7 +223,7 @@ shinyApp(ui = ui, server = server)
225223
```
226224
````
227225

228-
You can view a standalone version of Joe's app here: <R-shinylive-demo.qmd>
226+
You can view a standalone version of Joe's app here: [R-shinylive-demo.qmd](https://github.com/coatless-quarto/r-shinylive-demo/blob/main/R-shinylive-demo.qmd)
229227

230228
## Rendering Your Quarto Document
231229

0 commit comments

Comments
 (0)