Skip to content

Instantly share code, notes, and snippets.

@akbertram
Last active Mar 11, 2022
Embed
What would you like to do?
# This only needs to be run once, if you don't have these packages installed.
install.packages("ltm", "devtools")
devtools::install_github("bedatadriven/activityinfo-R")
# Load the activityinfo package, as well as the ltm package which
# provides the cronbach alpha's implementation
library(activityinfo)
library(ltm)
# Retrieve the data from ActivityInfo using the form id.
# This form is public so you do not need credentials.
df <- queryTable(formId = "cgw34tdl0l13ekh2")
# Extract only the scores we calculated in ActivityInfo
scores <- df[, c("S1", "S2", "S3", "S4", "S5", "S6")]
cronbach.alpha(scores)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment