hansorlee / irwpkg

R Package for accessing data from Item Response Warehouse (IRW)
https://datapages.github.io/irw/
Other
0 stars 0 forks source link

extend `‎generate_metadata_summary‎()` with more criteria #6

Open hansorlee opened 3 days ago

hansorlee commented 3 days ago
hansorlee commented 3 days ago

compute sparsity etc. https://redivis.com/projects/qa4k-6qqr2gghq/notebooks/6438

hansorlee commented 3 days ago

code to get response time:

not_data<-"metadata"
dataset<-redivis::organization("datapages")$
    dataset("Item Response Warehouse",version="v4.0")
dataset_tables <- dataset$list_tables()
##
print(length(dataset_tables))
names<-sapply(dataset_tables,function(x) x$name)
ii<-grep("metadata",names)
names(dataset_tables)<-names
if (length(ii)>0) dataset_tables<-dataset_tables[-ii]   
##
f<-function(table) table$list_variables()
nms<-lapply(dataset_tables,f)

##
f<-function(x) {
    nm<-sapply(x,function(x) x$name)
    "rt" %in% nm
}
test<-sapply(nms,f)
rt_data<-dataset_tables[test]
hansorlee commented 3 days ago

tags: https://docs.google.com/spreadsheets/d/1Dd6nMahZKtu952zEMkNX8Ai08BgMYR0RFQBMsHEtdlc/edit?gid=0#gid=0