add_skiplogic: Attaches a skip logic to a question

Description Usage Arguments Details Value Examples

View source: R/add_skiplogic.R

Description

Skip logic allows to send respondents to the end of the block or the end of the survey based on how they answered a question.

Usage

1
add_skiplogic(qsf, qid, block_id, condition, choice_id, skipto)

Arguments

qsf

qsf file as R list

qid

question id

block_id

block id

condition

either "Selected", "NotSelected", "Displayed", "NotDisplayed"

choice_id

choice id

skipto

either "ENDOFSURVEY" or "ENDOFBLOCK"

Details

To find the ID of a question and the block ID use get_block_description and get_questions.

Value

qsf file as R list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(svy_qsf)

# Respondents that select 'Male' (choice_id=1)
# are send to the end of the survey.

svy_mod <- add_skiplogic(svy_qsf, 
 qid='Q1',
 block_id='BL_npw6udfrvIt9oNT',
 choice_id=1,
 condition="Selected",
 skipto="ENDOFSURVEY")
 

sumtxt/qsf documentation built on Nov. 22, 2021, 9:31 p.m.