Interactive Pearson Correlation Homework Checker

Description

Creates a tinytable::tt() table with fill-in-the-blank and multiple choice inputs for checking Pearson correlation results and descriptive statistics. Requires the tinytable and webexercises packages.

Usage

create_corr_checker(rh_name, vars, corr_results_list)

Arguments

rh_name Character. Research hypothesis label shown in the header.
vars Character vector of length 2. Variable names used as row labels for the descriptive-statistics rows.
corr_results_list Output from corr_answers(). Must contain $Correlation (with r, p_value, df) and $Descriptives (with columns variable, mean, sd, n).

Value

A tinytable object with embedded webexercise elements.

Examples

library("psych350lab")

data(superman, package = "psych350data")
result <- corr_answers(superman, "clark_height_in", "rt_critics_score")
create_corr_checker("RH1", c("Clark Height", "Critics Score"), result)