Skip to content

Commit d4b2690

Browse files
authored
Updated exercise
1 parent 788db0d commit d4b2690

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

RShiny/lessons/layouts.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ Lets add a layout to the R Shiny app from the exercise a previous lesson. That a
753753
# Load libraries
754754
library(shiny)
755755
library(DT)
756-
library(ggplot2)
756+
library(tidyverse)
757757

758758
# User Interface
759759
ui <- fluidPage(
@@ -763,11 +763,13 @@ ui <- fluidPage(
763763
# Select from the dropdown menu the column you want on the x-axis
764764
selectInput(inputId = "x_axis_input",
765765
label = "Select x-axis",
766-
choices = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")),
766+
choices = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")
767+
),
767768
# Select from the dropdown menu the column you want on the y-axis
768769
selectInput(inputId = "y_axis_input",
769770
label = "Select y-axis",
770-
choices = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")),
771+
choices = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")
772+
),
771773
# The output plot
772774
plotOutput(outputId = "plot"),
773775
# The download plot button
@@ -801,8 +803,8 @@ server <- function(input, output) {
801803
# The content of the file will be the contents of the iris_plot() reactive expression
802804
content = function(file) {
803805
ggsave(
804-
filename = file,
805-
plot = iris_plot()
806+
filename = file,
807+
plot = iris_plot()
806808
)
807809
}
808810
)

0 commit comments

Comments
 (0)