DS4PS / ddmp-uw-class-spring-2019

Data-Driven Management & Policy Course at UW, Spring 2019
https://ds4ps.github.io/ddmp-uw-class-spring-2019/
4 stars 3 forks source link

Lab 9 #14

Closed wainman19 closed 5 years ago

wainman19 commented 5 years ago

My slider keeps creating an open text box, not an actual slider


title: "Lab 9" author: "Leah Wainman" runtime: shiny output: flexdashboard::flex_dashboard: vertical_layout: scroll


library(ggplot2)
library(plotly)
library(plyr)
library(flexdashboard)
library(shiny)
library(readr)

Tab 1: Inputs

Row


Let's begin by practicing inputs. You'll add three inputs to tab 1, but no outputs for now.

  1. Create a check box with four options for animals: dog, cat, pig, goat.
  2. Create a slider that I can adjust between 1953 and 1971.
  3. Create a select box that I can choose my level of education: No degree, some college, college, advanced.

You'll want to start by looking at the list of inputs in the lecture notes, and may want to use the help files for those inputs.


 checkboxGroupInput("Pets", "Select Pets:",
                     c("Dogs" = "Dog",
                       "Cats" = "Cat",
                       "Pigs" = "Pig",
                       "Goats" = "goat"))

Column

Slider

Create a slider that I can adjust between 1953 and 1971.

library(shiny)

sliderInput(inputId="Years",
                        label="Year of Doom",
                        min = 1953,
                        max = 1972,
                        value = 1960)
wainman19 commented 5 years ago

Got it