1

A seemingly easy formatting question for datatables, with R. I'd like to return tables/results on my flexdashboard which are formatted slightly different to the default format.

I'm not sure if datatables is the best way to do this, but basically I have a few crosstalk filters on a flexdashboard that users can use to filter down a set of character text results (basically a content search which could display like a google search result).


Sample data:

sample <- data.frame(Title = c("Title #1", "Title #2", "Title #3"),
                     Description = "Lorem ipsum dolor sit amet",
                     Date = c("2021-01-01", "2021-01-01", "2021-01-01"),
                     Link = c("www.google.com", "www.facebook.com", "www.twitter.com"))

datatable(sample, rownames = FALSE, colnames = c("","","",""), options = list(dom = 't', bSort=FALSE))

Desired result:

enter image description here

I'm working with flexdashboard and crosstalk, so any alternative solutions to data tables would need to keep that in mind.

kodikai
  • 374
  • 1
  • 10

0 Answers0