Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dombrovski committed Nov 14, 2018
2 parents 2a1a732 + 201a220 commit 5fca9d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Binary file modified pie_data.rdata
Binary file not shown.
9 changes: 8 additions & 1 deletion pie_dataimport.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ pie_data_proc<-ProcApply(multicorenum = 8,piedata_raw$list,pie_preproc,filter_fr

pie_firstfree<-ProcApply(piedata_raw$list,pie_preproc,filter_freechoice=T,only_firstfree=T)$df

save(piedata_raw,pie_data_proc,pie_firstfree,file = "pie_data.rdata")
varyingvars<-names(pie_data_proc$df)[grepl("[1-8]",names(pie_data_proc$df)) & !names(pie_data_proc$df) %in% names(piedata_raw$df)]
pie_data_proc_long<-reshape(data = pie_data_proc$df,v.names = unique(gsub("[0-9.]", "", varyingvars)),
varying = varyingvars, idvar = c("ID","trial","block_num"),times = 1:8,timevar = "segment",
direction = "long")
pie_data_proc_long<-pie_data_proc_long[order(pie_data_proc_long$ID,pie_data_proc_long$block_num,pie_data_proc_long$trial),]
pie_data_proc_long<-pie_data_proc_long[as.logical(apply(pie_data_proc_long[unique(gsub("[0-9.]", "", varyingvars))],1,function(x) { any(!is.na(x)) })),]

save(piedata_raw,pie_data_proc,pie_firstfree,pie_data_proc_long,file = "pie_data.rdata")

0 comments on commit 5fca9d1

Please sign in to comment.