r - Formatting number output of sliderInput in shiny -



r - Formatting number output of sliderInput in shiny -

a illustration of question found in film review illustration in shiny gallery here:

http://shiny.rstudio.com/gallery/movie-explorer.html

there slider on left hand side panel called "year released" ranges between 1940 , 2014. here code ui.r

sliderinput("year", "year released", 1940, 2014, value = c(1970, 2014))

you notice formatting of years when utilize slider of form:

"1,940" "2,014" comma separating first digit lastly three.

i know 1 can utilize daterangeinputin shiny requires variable in date format. info variables numbers referring years such example, there simple way format number output remove comma? can't seem figure out, seems simple.

in sliderinput add together format="####" argument. remove comma.

while not create sense years, can utilize format argument things command how decimals displayed.# indicates number should shown when nowadays , 0 indicates number should shown if nowadays , 0 shown if absent.

for illustration "####.00" show number 2 decimal places, no comma, not show thousands place if not there. format number 32.6 appear 32.60.

r shiny

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -