I'm using rMarkdown, knitting to html, and trying to do something simple in reactable - use JS to suppress row totals in parentheses. I'm literally copying from their own guide, but its not working:
reactable Grouped Cell Rendering
data <- MASS::Cars93[10:22, c("Manufacturer", "Model", "Type", "Price", "MPG.city")]
reactable(
data,
groupBy = c("Manufacturer", "Type"),
columns = list(
Manufacturer = colDef(
# Render grouped cells without the row count
grouped = JS("function(cellInfo) {
return cellInfo.value
}")
)
)
)
I get the following error:
Error in colDef(grouped = JS("function(cellInfo) {\n return cellInfo.value\n }")) :
unused argument (grouped = JS("function(cellInfo) {\n return cellInfo.value\n }"))
Any help would be much appreciated.