A shiny Module.

See DT package homepage for more details about styling tables. If no style is precised, this module show the raw data. If any style is given, then the dataset must be well configured (I.e. it must contain the correct columns )

formatDT_ui(id)

formatDT_server(
  id,
  data = reactive({
     NULL
 }),
  data_nostyle = reactive({
     NULL
 }),
  withDLBtns = FALSE,
  showRownames = FALSE,
  dt_style = reactive({
     NULL
 }),
  filename = "Prostar_export",
  selection = "single"
)

formatDT(data)

Arguments

id

shiny id

data

A data.frame

data_nostyle

A data.frame() to be bind to the main data with no custom style

withDLBtns

A boolean to indicate whether to display download buttons or not.

showRownames

A boolean to indicate whether to show rownames.

dt_style

A list composed of:

  • data : a data.frame

  • colors : a named vector

filename

A character(1) which is the default filename for download.

selection

A character(1) which indicates the type of selection. Default is 'single'.

Value

NA

NA

NA

NA

Examples

if (FALSE) { # \dontrun{
  data(vdata)
  formatDT(vdata)
} # }