Control number formatting in Shiny's implementation of DataTable

后端 未结 3 1747
灰色年华
灰色年华 2021-01-04 03:35

Aim

Render large numbers as with thousands separators in a shiny DataTable by default.

Problem

The documentation reads (to me) like it should alr

3条回答
  •  悲&欢浪女
    2021-01-04 04:05

    Try formatting the df you pass to renderDatatable() with thousands formatting

    df$x <- format(df$x, big.mark=',', scientific=FALSE) 
    

    Or

    df$x<-prettyNum(df$x, big.mark = ",")
    

提交回复
热议问题