Hello All,
I would like to format the display output of numbers (in dataframe below) to percentage in Shiny R output. Essentially, I am displaying numbers in three rows: "X1", "X2", "X3". At the moment, my output is like: X1: 0.6692 X2: 0.8466 X3: 0.5890
What I'd like to have is X1: 66.92% X2: 84.66% X3: 58.90%
I tried using scales::percent instead of the "round" but I am getting errors. I was wondering what is the easiest way to do this? Thank you all in advance.
output$pred_info <- renderReactable({
a<-PRED_res_CI()
req(a)
a<-t(a)
rownames(a)<-c("X1","X2","X3")
a<-a[c(1,3,2),]
reactable(round(a %>% data.frame(),4),style = list(fontFamily = "sans-serif", fontSize = "1.3rem"),
rowStyle = JS("function(rowInfo) {
return { background: '#eee', borderLeft: '2px solid #ffa62d' }