jtrecenti commited on
Commit
6628ae0
1 Parent(s): e1e51f5

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +5 -7
app.R CHANGED
@@ -7,18 +7,15 @@ df <- readr::read_csv("penguins.csv")
7
  # Find subset of columns that are suitable for scatter plot
8
  df_num <- df |> select(where(is.numeric), -Year)
9
 
10
- ui <- page_fillable(theme = bs_theme(bootswatch = "minty"),
11
- layout_sidebar(fillable = TRUE,
 
12
  sidebar(
13
  varSelectInput("xvar", "X variables", df_num, selected = "Bill Length (mm)"),
14
  varSelectInput("yvar", "Y variables", df_num, selected = "Bill Depth (mm)"),
15
  checkboxGroupInput("species", "Filter by species",
16
  choices = unique(df$Species), selected = unique(df$Species)
17
- ),
18
- hr(), # Add a horizontal rule
19
- checkboxInput("by_species", "Show species", TRUE),
20
- checkboxInput("show_margins", "Show marginal plots", TRUE),
21
- checkboxInput("smooth", "Add smoother"),
22
  ),
23
  plotOutput("scatter")
24
  )
@@ -36,6 +33,7 @@ server <- function(input, output, session) {
36
  theme(legend.position = "bottom")
37
  p
38
  })
 
39
  }
40
 
41
  shinyApp(ui, server)
 
7
  # Find subset of columns that are suitable for scatter plot
8
  df_num <- df |> select(where(is.numeric), -Year)
9
 
10
+ ui <- page_fillable(
11
+ theme = bs_theme(bootswatch = "minty"),
12
+ layout_sidebar(
13
  sidebar(
14
  varSelectInput("xvar", "X variables", df_num, selected = "Bill Length (mm)"),
15
  varSelectInput("yvar", "Y variables", df_num, selected = "Bill Depth (mm)"),
16
  checkboxGroupInput("species", "Filter by species",
17
  choices = unique(df$Species), selected = unique(df$Species)
18
+ )
 
 
 
 
19
  ),
20
  plotOutput("scatter")
21
  )
 
33
  theme(legend.position = "bottom")
34
  p
35
  })
36
+
37
  }
38
 
39
  shinyApp(ui, server)