Description Usage Arguments Examples
Multiple choice question options are in separate columns because the respondent can select or not select any number of them, or several combinations.
| 1 2 | mc_indicator(column, selected = 1, unselected = 0, missing = 0,
  na_id = NA)
 | 
| column | A vector containing the multiple choice answers. | 
| selected | What should be the replacement value of selected columns?
Defaults to  | 
| unselected | Depending on your questionnaire, not selecting an answer option can have
different meanings. Mostly you should substitute unselected values with  | 
| missing | Are there explicit missings in your column. Defaults to  | 
| na_id | Is there a special string for explicitly missing variables? (Default:  | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | mc_column_1 <- c("first option", NA, "first option", "NA" )
mc_indicator ( column     = mc_column_1,
               selected   = 1,
               unselected = 0,
               missing    = 0,
               na_id      = NA)
mc_indicator ( column     = mc_column_1,
               selected   = 1,
               unselected = 0,
               missing    = 0,
               na_id      = "NA")
mc_column_2 <- c(NA, "second option", NA, "NA")
mc_indicator ( column = mc_column_2,
               selected = 2,
               missing = NA,
               na_id = "NA")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.