Package 'ROvis.table'

Title: Accessible Data Tables with Rijksoverheid Styling
Description: Provides accessible, keyboard-navigable data tables and themed visualizations using the 'gt' and 'DT' packages, with Rijksoverheid styling guidelines.
Authors: ROvis team [cre, aut]
Maintainer: ROvis team <[email protected]>
License: EUPL (>= 1.2)
Version: 0.1.0
Built: 2026-10-21 12:18:54 UTC
Source: https://github.com/rivm-syso/ROvis.table

Help Index


datatable table to be used with DT

Description

[DT]

Rendering an accessible, keyboard-navigable (with customJS) data table table with options for sorting and page length.

Usage

ro_dt_table(data, caption, sorting = FALSE, pagelength = 10)

Arguments

data

Data frame or tibble. The data to display in the table.

caption

Character. Table caption/title (displayed above the table).

sorting

Logical. Should column sorting be enabled? Default is FALSE.

pagelength

Integer. Number of rows to display per page. Default is 10.

Value

data table html

See Also

Other DT: ro_dt_theme()

Examples

# In your Shiny server:
if (interactive()) {
ro_dt_table(
  data = my_data,
  caption = "Aantal gevallen per groep",
  sorting = TRUE,
  pagelength = 20
)
}

Custom DT Table CSS Styling

Description

[DT]

Returns a Shiny tags object containing custom CSS styles for DT tables, following preliminary Rijksoverheid huisstijl.

Usage

ro_dt_theme(base_family = "RijksoverheidSansWebText", sorting = FALSE)

Arguments

base_family

Character. Font family to use for table text. Default is "RijksoverheidSansWebText". If not installed, Verdana is used, then Arial, then the first font found on your device, whichever is installed first.

sorting

Logical. If TRUE, column headers are moved, to make space for arrows. if FALSE, right-aligned. Default is FALSE.

Value

A shiny.tags object with a <head> tag containing custom CSS for DT tables.

See Also

Other DT: ro_dt_table()

Examples

if (interactive()) {
  ui <- fluidPage(
    ro_dt_theme(sorting = FALSE),
    DTOutput("mytable")
  )
  server <- function(input, output, session) {
    output$mytable <- renderDT(datatable(iris, rownames = FALSE, options(list(ordering=FALSE))))
  }
  shinyApp(ui, server)
}

Use a standardized theme for gt tables

Description

[gt]

This function implements a stylized theme for gt tables.

Usage

ro_gt_theme(df, ROfont = FALSE, ...)

Arguments

df

Dataframe.

ROfont

Default is FALSE, will change to TRUE for next major release (1.0.0). If Rijksoverheid font is not available on your device, Verdana is used, then Arial, then the first font found on your device, whichever is installed first.

...

For internal use. Leave empty.

Value

gt table object.

Examples

## Not run: 
ro_gt_theme(df)

## End(Not run)