| codebook_report | R Documentation |
Produces a structured codebook listing all items, their types, choice sets, scale membership, and reverse-coding status. The codebook can be rendered as HTML or Markdown.
codebook_report(instrument, format = c("html", "md"))
instrument |
An |
format |
Character. Output format. Either |
An object of class sframe_codebook, a list with elements
instrument_meta, items_table, choices_table, and scales_table.
Call print() to display a compact summary or use render_report() to
include the codebook in a full report.
render_report()
cs <- sf_choices("ag5", 1:5,
c("Strongly disagree", "Disagree", "Neutral",
"Agree", "Strongly agree"))
i1 <- sf_item("sat_1", "Item 1", type = "likert",
choice_set = "ag5", scale_id = "sat")
i2 <- sf_item("sat_2", "Item 2", type = "likert",
choice_set = "ag5", scale_id = "sat")
scale <- sf_scale("sat", "Satisfaction", items = c("sat_1", "sat_2"))
instr <- sf_instrument("Demo Survey", components = list(cs, i1, i2, scale))
cb <- codebook_report(instr)
print(cb)
nrow(cb$items_table)
nrow(cb$scales_table)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.