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.
Arguments
- codebook
A
redcap_codebookobject returned bybuild_codebook().- page_length
Number of rows to show per interactive table page.
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")
} # }
