I have R data.frame like this one:
df <- data.frame(RowNames <- c("FirstCol","SecondCol","ThirdCol","FourthCol"),
FirstCol <- c(0.1,0,0,0.28),
SecondCol <- c(0,0,0.1,0),
ThirdCol <- c(0,0,0,0.3),
FourthCol <- c(0.28,0,0,0.7),
FifthCol <- c("hi","hello","cus","good bye"))
names(df) <- c("RowNames", "FirstCol", "SecondCol", "ThirdCol", "FourthCol","FifthCol")
and I'd like to deploy this data frame into website as a DataTables concept (link). So for that purpose I'm using DT package:
library(DT)
dt <- datatable(df)
But I can see that table only inside of RStudio in it's Viewer. I'd like to use this output table in my website but for that purpose I need json file. Is there any way, how can I extract json file from that DT table and make it useful for my website? Thank you very much in advance.