Generate_Response_Profile: Generate_Response_Profile: Track the variables from your...

View source: R/report.R

Generate_Response_ProfileR Documentation

Generate_Response_Profile: Track the variables from your survey

Description

This function takes a survey list (either raw or filtered) and returns a data.table that has the number of responses gathered for the questions and answer codes provided in the "Demographic_Variables_Answers" parameter. Can use, for example, an excel sheet with the question codes, question texts, answer codes, and answer texts to give you a full picture of how many responses you have for each

Usage

Generate_Response_Profile(Survey_List, Variables_Answers)

Arguments

Survey_List

This is a survey list: this is a list containing the downloaded data from the survey for a multiple-part survey.

Variables_Answers

table that specifies four columns: variable_to_tally- the Limesurvey code for the variable that you want to tally (count) responses for, variable_text, answer_code, answer_text. I generally read in a csv that has four columns: "variable_to_tally"- this is the limesurvey question code that we'd like to track, "variable_text"- the question text for this variable, "answer_code"- the answer codes for this question, and "answer_text"- the answer text corresponding to the answer code. This means that each variable has one row per answer code.

Value

a table with the corresponding counts for each question/response pair (a data.table that shows how many responses for each of the demographic questions were gathered (from the completes))

Examples

Demographic_Profile_Cint <- Generate_Response_Profile(Filtered_Surveys_Cint, Demographic_Variables_Answers_ProjectX)

bpresentati/surveyR documentation built on March 19, 2022, 3:40 a.m.