Description Usage Arguments Details See Also Examples
View source: R/construct_displaylogic.R
Helper function to construct conditions when a question is displayed.
1 |
... |
key-value tuple (see below) |
Each condition comes as a tuple. The first condition takes the key "0" and all subsequent conditions are numbered. The value is a named list with the following elements: qid
(QuestionID), operator
("Selected", "NotSelected"), choice_id
. If there is more than one condition, all tuples other than that with key="0" must also include the parameter conjuction
with the value "OR" or "AND".
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(svy_qsf)
# Display question "born" only
# when respondent selected 1 or 2
# for the first question
qsf_mod <- update_question(svy_qsf,
id_name='SecondaryAttribute',
id='born',
DisplayLogic=construct_displaylogic(
`0`=list(qid="Q1", operator="Selected", choice_id="1"),
`1`=list(qid="Q1", operator="Selected", choice_id="2", conjuction='Or'))
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.