process_responses: Process responses from a CourseKata class data download

View source: R/process_responses.R

process_responsesR Documentation

Process responses from a CourseKata class data download

Description

The process_responses() function processes the responses found in the given object. The responses are checked for required columns in ensure_data_in_responses(), the variables in the outcome table are converted to appropriate types with convert_types_in_responses(), and multiple-response option indices in response (lrn_type = 'mcq') are mapped to their values (⁠lrn_option_<index>⁠) with map_response_options().

Usage

process_responses(object, time_zone = "UTC", class_id = NULL)

Arguments

object

The object to process the data from. This can be one of a variety of options:

  • the path(s) to a CourseKata data download zip file or the directory extracted from that zip

  • the path(s) to a specific CSV file (e.g. classes.csv)

  • a data.frame

time_zone

The time zone to use when parsing date-time objects (see timezones).

class_id

(Optional) A character vector of the IDs of specific classes you want to extract data for. These values should correspond to the names of the directories where the desired CSV files can be found in the original data download.

Value

A tibble of all responses found in the given path or data frame. If there are multiple responses.csv files, they are merged together and can be distinguished by the class_id column. If object is a directory and class_id is specified, only the responses for the specified class or classes are included.

See Also

Other processing functions: process_auxiliary


UCLATALL/CourseKataData documentation built on Dec. 4, 2023, 2:25 a.m.