Fresh to shiny...
 1. I want to create an ui.R using dashboardPage and define a selectInput box (Done!)
 2. As soon as the user will selects one of the fields in the selectInput, a Schools_Info.R file would be sourced.
    I have tried source("Schools_Info.R") but I want some function which will run Schools_Info.R in backgroud.
How you do that?
 3. Schools_Info.R contains values that I want to use as the min and max of a
sliderInput.
How can I define sliderInput that will adjust its limits(min and max) automatically according to whatever the user selects from selectInput box?
ui.R
library(shiny)
options(shiny.trace=TRUE)
library(shinydashboard)
locations <- c("Select your location",
           paste0("\tLocation1"),
           paste0("\tLocation2"),               
           paste0("\tLocation3")
           )
ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
    dashboardSidebar(
          selectInput("selectedLoc",choices = locations),
          source("Schools_Info.R"),
          sliderInput("slider", "Number of observations:", 1, min, max)),
    dashboardBody(
      fluidRow(
      box(
        title = "Controls",
      )
    )
  )
)
 
     
    