我想使用 formattable 在 R Shiny 上显示数据框。但是,这里的解决方案不起作用。 https://cran.r-project.org/web/packages/formattable/vignettes/formattable-data-frame.html
scores <- data.frame(id = 1:5,
prev_score = c(10, 8, 6, 8, 8),
cur_score = c(8, 9, 7, 8, 9),
change = c(-2, 1, 1, 0, 1))
width_formatter <- formatter("span",
style = x ~ style("width" = '100px'))
formattable(scores, list(width_formatter))
我该怎么做?谢谢