It seems the API allows for renaming columns within options > columnDefs
(see here). However, passing name
as an argument doesn’t seem to take. Does DT
not support this or am I doing something wrong? I don’t want to rename the columns upstream; I just want to know if I’m missing something in the documentation.
Here the searchable
argument is used (the mpg
column search is greyed out) but the name
argument is not applied:
mtcars |>
DT::datatable(
filter = "top",
options = list(
columnDefs = list(
list(targets = 1, name = "x", searchable = FALSE)
)
)
)
Recognized by R Language Collective