Code omission from Shiny Basics tutorial

I think that Shiny Basics lesson 4, found at Shiny - Display reactive output, is missing text from the first code snippet on the page.

Here is the code that is provided:

ui <- page_sidebar(
  title = "censusVis",
  sidebar = sidebar(
    helpText(
      "Create demographic maps with information from the 2010 US Census."
    ),
    selectInput(
      "var",
      label = "Choose a variable to display",
      choices = 
        c("Percent White",
          "Percent Black",
          "Percent Hispanic",
          "Percent Asian"),
      selected = "Percent White"
    ),
    sliderInput(
      "range",
      label = "Range of interest:",
      min = 0, 
      max = 100, 
      value = c(0, 100)
    )
  ),
)

Below the snippet it states ,"Notice that textOutput takes an argument, the character string "selected_var". Each of the *Output functions require a single argument: a character string that Shiny will use as the name of your reactive element."

It seems to me that there is supposed to be a textOutput function call after the last comma in the code provided here, but there isn't. Since no authors for this document are listed and there is no avenue for feedback, I figured I'd post here in case somebody knows who to talk to to get this fixed.

Thanks! Looks like you were right, and this has been fixed.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.