get_questions: Extract questions from QSF file

Description Usage Arguments Details Value Examples

View source: R/get_questions.R

Description

Extract questions from QSF file

Usage

1

Arguments

qsf

qsf file as R list

df

convert to a data.frame? (default: TRUE)

Details

This function extracts all questions from a QSF file and can convert those to a data.frame.

Value

If df=FALSE the function pulls all questions from the qsf without further modifications. If df=TRUE the function returns a data.frame with columns as listed below. Note, that the conversion into a data.frame does not preserve information such as display and skip logic.

QID: Question ID (newly generated based on the sequence of questions in qsf) ID: Choice ID (if Class="Question" then ID=0) Display : Displayed text Class: One of three values: Question, Choices, Answers. Language : The language code of the question, choice or answer. QuestionType : Value from [['Payload']][['QuestionType']] PrimaryAttribute: Value from [['PrimaryAttribute']] SecondaryAttribute: Value from [['SecondaryAttribute']] TextEntry: Text-entry allowed?

Examples

1
2
3

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