I don't know if I understand what you want but try something like this :
library(shiny)
library(shinythemes)
library(leaflet)
library(DT)
ui <- fluidPage(theme = shinytheme("united"),
titlePanel(HTML("<h1><center><font size=14> Crimes in Washington, DC (2017) </font></center></h1>")),
# titlePanel("Crimes in Washington, DC (2017)", align = "center"),
fluidRow(
column(4, align = "center",
selectInput("offenceInput", "Type of Offence",
choices = c("a","b"),
selected = "",
multiple = F),
selectInput("methodInput", "Method of Offence",
choices = c("a","b"),
selected = "",
multiple = F),
selectInput("shiftInput", "Police Shift",
choices = c("a","b"),
selected = "",
multiple = F),
selectInput('background', 'Background',
choices = c("a","b"),
multiple = FALSE,
selected = ""),
dateRangeInput('daterangeInput',
label = 'Date',
start = as.Date('2017-01-01') , end = as.Date('2017-12-31'))
),
column(8, leafletOutput(outputId = 'map', height = 350, width = "100%"))
),
fluidRow(
column(6, plotOutput("distPlot")),
column(6, dataTableOutput('my_table'))
)
)
server <- function(input, output) {
output$distPlot <- renderPlot({
# generate bins based on input$bins from ui.R
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = 10 + 1)
# draw the histogram with the specified number of bins
hist(x, breaks = 10, col = 'darkgray', border = 'white')
})
output$map <- renderLeaflet({
leaflet() %>% setView(18.2373, 38.066, zoom = 4) %>% addTiles()
})
output$my_table <- renderDataTable({
datatable(iris)
})
}
shinyApp(ui = ui, server = server)