rashid rashid - 1 year ago 176
R Question

How to display numbers in percent format?

How can I change the number format of widgets in Shiny?

I have a slider going from 0 to 1 but I'd prefer having it going from 0% to 100%. I know I could just multiply the numbers by 100 but then I would still not be able to display numbers in percent. Is it possible to do so?

Since this was marked as a duplicate: the other post proposed that one uses

format =
but R tells me that piece of codes is depreciated.

Answer Source

You can use the post argument to sliderInput.



ui <- shinyUI(
    sliderInput("mySlider",label="my slider", min = 0, max = 100, post  = " %", value = 50)

server <- shinyServer(function(input, output) {


shinyApp(ui=ui, server=server)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download