Skip to content

Commit 83c0bbf

Browse files
authored
Polished lesson
1 parent e24a14e commit 83c0bbf

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

RShiny/lessons/01_syntax_and_structure-shiny.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ textInput(inputId = "input_text",
151151
label = "My input text"),
152152
```
153153

154-
There are many types of input and output types in RShiny, we will discuss these types at length in the upcoming lessons. In this example, we are **creating a text input** using the `textInput()` function. There are two arguments:
154+
There are many types of input and output in RShiny, we will discuss these types at length in the upcoming lessons. In this example, we are **creating a text input** using the `textInput()` function. There are two arguments:
155155

156156
1. The first argument, `inputId`, is the variable name for the user input to be stored to.
157157
2. The second argument, `label`, is a character string representing the text which will be placed above the input text box.
@@ -191,10 +191,10 @@ Inside the function we place the following code:
191191

192192
```
193193
# DO NOT RUN
194-
# Render the text
195-
output$output_text <- renderText({
196-
input$input_text
197-
})
194+
# Render the text
195+
output$output_text <- renderText({
196+
input$input_text
197+
})
198198
```
199199

200200
Here, we are using the `renderText()` function to take the object from `textInput()` render it as output. We then take that rendering and assign it to `output$output_text` which ties back to the `textOutput()` function we had in the UI section of code.
@@ -207,7 +207,7 @@ Now that we've gone through each line, let's talk about what happens when we run
207207

208208
1. The input text is entered into the box created by `textInput()` and saved as `input$input_text`
209209
2. This `input$input_text` object is sent to the server which sees that `input$input_text` is used to create the rendered text for `output$output_text`.
210-
3. This `output$output_text` output is then sent back to the UI where it is displayed in the `textOutput()` fucntion
210+
3. This `output$output_text` output is then sent back to the UI where it is displayed in the `textOutput()` function
211211

212212
The diagram below illustrates how this works.
213213

@@ -258,6 +258,6 @@ Describe what information `input$input_text` and `output$output_text` holds.
258258

259259
---
260260

261-
[Next Lesson >>](02_inputs.qmd)
261+
[Next Lesson >>](02_inputs.md)
262262

263263
[Back to Schedule](../README.md)

0 commit comments

Comments
 (0)