Skip to content

Instantly share code, notes, and snippets.

@akbertram
Last active March 11, 2022 08:14
Show Gist options
  • Save akbertram/352682e3c20fedc1c2f6b4e5136eede2 to your computer and use it in GitHub Desktop.
Save akbertram/352682e3c20fedc1c2f6b4e5136eede2 to your computer and use it in GitHub Desktop.
# 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