chapter2/exercise14.R
and run.ui.R
and server.R
ui.R
server.R
chapter2/exercise15.R
and run. Experiment with the columns widths.offset
parameter to the column()
function, e.g. column(4, offset=1, ...)
Reproduce
r
library(jrShiny)
layout(matrix(c(1, 1, 1, 0, 2, 0), 2, 3, byrow = TRUE), heights = c(8, 4))
layout_show(2, text = c("Plot", "Drop down"))
Hint: You will need to use the offset
argument
Reproduce
r
library("jrShiny")
layout(matrix(c(0, 1, 1, 1, 1, 1, 0,
0, 0, 2, 2, 2, 0, 0), 2, 7, byrow = T), heights = c(8, 4))
layout_show(2, text = c("Plot", "Drop down"))
Hint: You will need to use the offset
argument and two fluidRow
File
, then New File
, then Shiny Web App
ui.R/server.R
Congrats, you've just created your first shiny app! We're going to use the iris data set to build up a shiny app.sliderInput()
from the siderbarPanel and add the selectInput()
from exercise 5, i.e.
r
selectInput("flower_choice", "Choose your flower",
choices = unique(iris$Species))
server.R
, get the plot to display the plot from exercise 6Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.