ensure_data_in_responses: Ensure a responses data frame has the required columns.

View source: R/process_responses.R

ensure_data_in_responsesR Documentation

Ensure a responses data frame has the required columns.

Description

A responses table isn't very useful without some basic information: the class the response was elicited in, the student it was elicited from, and the prompt that elicited the response (but not necessarily the response – a missing response is a response in itself). This function ensures that the columns exist in the data frame (failing with an error message if not) and filters out rows that are missing required data (emitting a warning if so).

Usage

ensure_data_in_responses(responses)

Arguments

responses

A CourseKata responses table (e.g. from responses.csv).

Value

If no problems are found, the original object is returned. When problems are found, the corresponding rows are removed from the output table.

See Also

process_responses


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