Skip to contents

view_codebook() turns a redcap_codebook object from build_codebook() into a static HTML viewer with tab-style section navigation and one interactive table per codebook section. The returned object prints in the RStudio/Posit Viewer. Use save_codebook() to save an HTML file for sharing or email attachment. Event, event-instrument, and repeating-structure sections are omitted when those API tables are empty.

Usage

view_codebook(codebook, page_length = 25)

Arguments

codebook

A redcap_codebook object returned by build_codebook().

page_length

Number of rows to show per interactive table page.

Value

An htmltools browsable HTML object containing interactive DT tables.

Examples

if (FALSE) { # \dontrun{
codebook <- build_codebook(
  redcap_uri = Sys.getenv("REDCAP_URI"),
  token = Sys.getenv("REDCAP_TOKEN")
)

viewer <- view_codebook(codebook)
save_codebook(codebook, "codebook.html")
} # }