darwin-eu / visOmopResults

https://darwin-eu.github.io/visOmopResults/
Apache License 2.0
1 stars 0 forks source link

table functions to work with empty tables #241

Open catalamarti opened 5 hours ago

catalamarti commented 4 hours ago

I have this utility function for the moment:

emptyTable <- function(type) {
  x <- dplyr::tibble(`Table has no data` = character())
  switch (type,
    "tibble" = x,
    "gt" = gt::gt(x),
    "flextable" = flextable::flextable(x)
  )
}