How can I replace underscore in column names of datatable with white space?
library(DT)
D_d<-c("34","43","43")
d_g<-c("45","54","54")
f<-data.frame(D_d,d_g)
dt::datatable(f
CodePudding user response:
You can use str_replace
from stringr
names(f) <- stringr::str_replace(names(f), "_", " ")