diff --git a/iat-analysis.R b/iat-analysis.R index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9c9f7c15342b1234ecc89aabf550750dcb1fa368 100644 --- a/iat-analysis.R +++ b/iat-analysis.R @@ -0,0 +1,65 @@ +#load basic libraries for graphs +library(dplyr) +library(tidyr) +library(ggplot2) +library(stringr) + +#set working directory where this source file is +setwd("/home/bonte/git/aiat") + +#read datas from IAT-master +data <- read.table("data/Cooperation-bru-2019-01-24-17-15.txt", + sep=",", + dec= ".") %>% + tbl_df() + +colnames(data) <- c("trial", + "round", + "category", + "item", + "error", + "reactionTime") + +items <- list(c("compétition", + "gain", + "profit", + "winner", + "performance"), + c("coopération", + "équité", + "égalité", + "gentillesse", + "solidarité"), + c("je", + "soi", + "mon"), + c("autre", + "eux", + "pas moi")) + +data %>% + mutate(category = recode_factor(category, + "A"= "Appropriation", + "P"= "Partage", + "1"= "Moi", + "2"= "PasMoi")) %>% + ggplot() + + geom_density(aes(x= reactionTime, color=category)) + + facet_wrap(~trial) + + ggsave("all-reaction-times.pdf") + + +data %>% + mutate(category = recode_factor(category, + "A"= "Appropriation", + "P"= "Partage", + "1"= "Moi", + "2"= "PasMoi")) %>% + mutate(trial=as.factor(trial)) %>% + ggplot() + + geom_density(aes(x= reactionTime, color=trial), size =1.5) + + ggsave("per-trial-reaction-times.pdf") + + + + diff --git a/input.txt b/input.txt new file mode 100755 index 0000000000000000000000000000000000000000..84bc050f6d5bcd20a81f9dbea80dc0e033877a9e --- /dev/null +++ b/input.txt @@ -0,0 +1 @@ +{"name":"Cooperation","showResult":"show","IATtype":"two","catA":{"label":"Appropriation","datalabel":"A","itemtype":"txt","items":["comp\u00e9tition","gain","profit","winner","performance"]},"catB":{"label":"Partage","datalabel":"P","itemtype":"txt","items":["coop\u00e9ration","\u00e9quit\u00e9","\u00e9galit\u00e9","gentillesse","solidarit\u00e9"]},"cat1":{"label":"Moi","datalabel":"1","itemtype":"txt","items":["je","soi","mon"]},"cat2":{"label":"Pas moi","datalabel":"2","itemtype":"txt","items":["autre","eux","pas moi"]}} \ No newline at end of file