get_reorganized_questions_and_blocks: Get Restructured Questions (with inserted Responses) and...

Description Usage Arguments Value

View source: R/reorganizing_survey_data.R

Description

This function returns a list with two elements, where the first element is questions with their responses and results-tables listed in them, and secondly the blocks of the survey, with questions listed in each block as BlockElements.

Usage

1
get_reorganized_questions_and_blocks(survey, responses, original_first_rows)

Arguments

survey

A qualtrics survey list object, uploaded from a Qualtrics Survey File (QSF). Use ask_for_qsf() to create such a survey list object from a QSF file.

responses

A dataframe of Qualtrics responses to a survey. Use ask_for_csv() to create such a dataframe from a CSV file.

original_first_rows

A dataframe contianing the header information for each column of response data. This dataframe includes a row for the DataExportTag based response column names, another for the Question Text stem and choice text (although truncated), and a row with QID based column names.

Value

A list with two elements: the questions, and the survey blocks. All questions in the trash are excluded, HTML and CSS are removed from question text, responses, notes, and a more easily human readable question type are inserted into each question. The blocks then have their BlockElements replaced by corresponding questions where applicable. The BlockElements of the list of Blocks from a survey originally only refer to questions by their DataExportTag. However, this is inconvenient because it adds an additional lookup step, and so they are replaced by the real objects here.


ctesta01/qualtrics-R-package documentation built on May 14, 2019, 12:28 p.m.