File: ui.R

package info (click to toggle)
r-cran-rsconnect 1.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,044 kB
  • sloc: python: 185; sh: 13; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
library(shiny)
library(ggplot2)

dataset <- diamonds

shinyUI(pageWithSidebar(

  headerPanel("Diamonds Explorer"),

  sidebarPanel(

    sliderInput("sampleSize", "Sample Size", min = 1, max = nrow(dataset),
                value = min(1000, nrow(dataset)), step = 500, round = 0),

    selectInput("x", "X", names(dataset)),
    selectInput("y", "Y", names(dataset), names(dataset)[[2]]),
    selectInput("color", "Color", c("None", names(dataset))),

    checkboxInput("jitter", "Jitter"),
    checkboxInput("smooth", "Smooth"),

    selectInput("facet_row", "Facet Row", c(None = ".", names(dataset))),
    selectInput("facet_col", "Facet Column", c(None = ".", names(dataset)))
  ),

  mainPanel(
    plotOutput("plot")
  )
))