How to add sliderbars in a shiny R dashboard

0 votes
How to add sliderbars in a shiny R dashboard?
Dec 5, 2018 in Data Analytics by Ali
• 11,360 points
1,151 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 5, 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 5, 2018 by Kalgi
• 52,360 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
3,674 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
• 33,030 points
509 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 Oct 30, 2020 in Data Analytics by MD
• 95,440 points
494 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,840 points
2,351 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 29, 2018 in Data Analytics by Maverick
• 10,840 points
3,168 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 30, 2018 in Data Analytics by Maverick
• 10,840 points
680 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,240 points
4,227 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP