ns_alter_checkbox | R Documentation |
This function processes checkbox matrix variables in a dataset, transforming their representations into one of the specified formats.
ns_alter_checkbox(data, to = c("character", "list"), sep = ",", cb = NULL)
data |
A 'data.frame' containing the dataset to modify. |
to |
A character string specifying the output format for checkbox matrix variables. Must be one of "character" or "list". |
sep |
A character string used as a separator when 'to = "character"'. Defaults to '","'. |
cb |
An optional codebook ('data.frame') to identify checkbox matrix variables. If 'NULL', the codebook is generated using 'ns_get_codebook()'. |
A modified 'data.frame' with processed checkbox matrix variables.
## Not run:
dt <- ns_get_data(11000)
ns_alter_checkbox(data = dt, to = "list")
ns_alter_checkbox(data = dt, to = "character", sep = ";")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.