choice_text_from_question: Get the Choice Text based on the Choice from a Question

Description Usage Arguments

Description

Input a question and a variable corresponding to a choice, and this function returns the choice text. The function works by determining the question type and some question properties and then using a combination of the question's list of choices and related values. The text is then cleaned of any HTML before returned.

Usage

1
choice_text_from_question(question, choice)

Arguments

question

This is a list object representing an individual question from a Qualtrics Survey File. The question must have a paired response column placed into the question under [['Responses']]. The insertion of the responses into questions is handled by link_responses_to_questions.

choice

A numeric value representing the choice made in a response to the question provided. This choice can be a choice in a cell in the response columns associated with the given question, but it can also be a choice which was not chosen by any respondents in the responses dataframe as long as it is a choice built into the question's construction.


ctesta01/QualtricsTools documentation built on May 14, 2019, 12:27 p.m.