How to add sliderbars in a shiny R dashboard?

0 votes
How to add sliderbars in a shiny R dashboard?
Dec 4, 2018 in Data Analytics by Ali
• 11,270 points
302 views

2 answers to this question.

0 votes

You use the function called sliderInput. Try adding this where ever you need the sliderbar

box(title = "controls for dashboard",status = "primary",solidHeader = T,
                  sliderInput("bins","number of breaks",1,100,50))
answered Dec 4, 2018 by Haseeb
0 votes

To add slider bar and slider range you can do something like this:

server.R

function(input, output) {

  # You can access the value of the widget with input$slider1, e.g.
  output$value <- renderPrint({ input$slider1 })

  # You can access the values of the second widget with input$slider2, e.g.
  output$range <- renderPrint({ input$slider2 })
}

ui.R



fluidPage(
  fluidRow(
    column(4,
      
      # Copy the line below to make a slider bar 
      sliderInput("slider1", label = h3("Slider"), min = 0, 
        max = 100, value = 50)
    ),
    column(4,
  
      # Copy the line below to make a slider range 
      sliderInput("slider2", label = h3("Slider Range"), min = 0, 
        max = 100, value = c(40, 60))
    )
  ),
  
  hr(),
  
  fluidRow(
    column(4, verbatimTextOutput("value")),
    column(4, verbatimTextOutput("range"))
  )
  
)
answered Dec 4, 2018 by Kalgi
• 51,970 points

Related Questions In Data Analytics

+1 vote
1 answer

How to add videos in a shiny R dashboard?

Its pretty simple, try this: server.r library(shiny) shinyServer(function(input, output, session) ...READ MORE

answered Dec 4, 2018 in Data Analytics by Haseeb
955 views
+5 votes
0 answers
0 votes
1 answer

How to add elements into a list in R?

hey, Add elements into list as below. list = ...READ MORE

answered Sep 30, 2019 in Data Analytics by anonymous
• 32,490 points
140 views
0 votes
1 answer

How to add a new column to a Dataframe in R?

Hi@akhtar, You can add new columns to a ...READ MORE

answered 14 hours ago in Data Analytics by MD
• 68,280 points
5 views
+1 vote
1 answer

Error saying "could not find function "shinyUI"" in shiny R

Its a small spelling mistake that you've ...READ MORE

answered Nov 28, 2018 in Data Analytics by Maverick
• 10,820 points
985 views
+1 vote
1 answer

Error saying "could not find function dashboardPage" in shiny R

Include this line in the code: Library(shinydashboard) READ MORE

answered Nov 28, 2018 in Data Analytics by Maverick
• 10,820 points
735 views
0 votes
1 answer

How do I add Icons to my messages on my dashboard which I’m creating using shiny r?

Try something like this: dashboardHeader(title="Edureka", dropdownMenu type = "message", messageItem(from = ...READ MORE

answered Nov 29, 2018 in Data Analytics by Maverick
• 10,820 points
149 views
0 votes
1 answer

How to evaluate expression given as a string in R?

The eval() function evaluates an expression, but "5+5" is a string, ...READ MORE

answered Jun 7, 2018 in Data Analytics by DataKing99
• 8,210 points
1,474 views