getClinDTButtons {clinUtils}R Documentation

Get a default set of buttons to be included in the interactive table for clinical data.

Description

Get a default set of buttons to be included in the interactive table for clinical data.

Usage

getClinDTButtons(
  type = c("copy", "csv", "excel", "pdf", "print"),
  typeExtra = NULL,
  opts = NULL
)

Arguments

type

Character vector with type of buttons, among:

  • for export data:

    • 'copy' (by default): copy data to clipboard

    • 'csv' (by default): export selected data to a csv file

    • 'excel' (by default): export selected data to an Excel file

    • 'pdf' (by default): export data in a PDF file, in landscape format

    • 'print' (by default): extract the data with the print function of the browser

    For all these buttons, only the visible columns (selected by the show/hide button) are exported. The variables used for row grouping are always exported as well.

  • to show/hide columns :

    • 'colvis': include a collection of buttons to show/hide specific columns.
      Specific columns that should not be listed should be defined in nonVisibleVar in getClinDT

typeExtra

Character vector with type of button(s) that should be added to the default set of buttons.

opts

List with extra opts for specific buttons. The list should be named with the button type.

Details

The 'colvis' button doesn't display the non visible columns.
These are defined internally with:

options = list(
  columnDefs = list(
    list(targets = [X], className = 'noVis')
  )
)

with [X] the index of the column(s) in Javascript notation (starting from 0)

Value

Nested list with default buttons to be passed on to 'buttons' option in the getClinDT.

Author(s)

Laure Cougnaud


[Package clinUtils version 0.1.4 Index]