Skip to content

Instantly share code, notes, and snippets.

View ui.R
# Define UI for miles per gallon application
# Application title
headerPanel("Miles Per Gallon"),
# Sidebar with controls to select the variable to plot against mpg
# and to specify whether outliers should be included
cryoguy / server.R
Created Nov 12, 2016
R Shiny Stuff
View server.R
#from here
# We tweak the "am" field to have nicer factor labels. Since this doesn't
# rely on any user inputs we can do this once at startup and then use the
# value throughout the lifetime of the application
mpgData <- mtcars
mpgData$am <- factor(mpgData$am, labels = c("Automatic", "Manual"))