append_survey: Append survey questions to an existing survey

Description Usage Arguments Details Examples

View source: R/append_survey.R

Description

Transplanting survey elements (e.g., questions) from one survey to another

Usage

1
append_survey(qsf, sq)

Arguments

qsf

qsf file as R list

sq

list of survey questions (elements)

Details

Note that new survey questions also need to be attached to a question block (see attach_question).

Examples

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

# Copy Q1 from survey 
q <- get_question(svy_qsf, id_name='PrimaryAttribute', id='Q1', df=FALSE)

# Remove Q1 from survey 
qsf <- remove_question(svy_qsf, id_name='PrimaryAttribute', id='Q1')

# Reappend Q1 to survey
qsf <- append_survey(qsf, list(q))
 

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