Commit 99fe995b authored by Bonte Bruno's avatar Bonte Bruno

analysing scripts and data

parent b0819d7d
#load basic libraries for graphs
library(dplyr)
library(tidyr)
library(ggplot2)
library(stringr)
# Set the path to the IAT folder here (be sure to include trailing slash)
# on Linux (use a single forward slash):
base.dir = "~/Documents/Research/IAT/"
base.dir = "~/git/aiat/"
# on Windows (use double forward slashes):
# base.dir = "C://Users//winteram//Documents//IAT//"
......@@ -8,8 +14,8 @@ base.dir = "~/Documents/Research/IAT/"
fd = '/'
# Set the template you want to analyze here
template.name = "Science"
output.dir = paste(base.dir,"templates",fd,template.name,fd,"output",fd,sep="")
expe.name = "IAT-2"
output.dir = paste(base.dir,"data",fd,expe.name,sep="")
setwd(output.dir)
output.files = list.files()
......@@ -33,5 +39,8 @@ for(i in 1:length(data.list))
}
rm(block4.m,block4.sd,block7.m,block7.sd,d,data.list,diff,filename,full.sd,i,iat.date,id,output.files)
setwd(paste(base.dir,"templates",fd,template.name,sep=""))
write.csv(summarized, "summarized.csv")
setwd(paste(base.dir,"data",sep=""))
write.csv(summarized, paste0("summarized-", expe.name,".csv"))
summarized %>% tbl_df()
0,0,P,1,0,2133
0,1,A,0,0,990
0,2,A,2,0,1185
0,3,P,1,0,816
0,4,A,2,0,872
0,5,A,0,0,1608
0,6,A,2,0,768
0,7,P,0,0,808
0,8,P,2,0,776
0,9,A,0,0,800
0,10,A,2,0,824
0,11,A,1,1,1512
0,12,A,0,0,984
0,13,A,2,0,896
0,14,A,0,0,463
0,15,P,1,0,577
0,16,P,2,0,504
0,17,A,1,1,1736
0,18,P,2,0,752
0,19,A,0,0,1824
1,0,2,0,0,1063
1,1,1,2,0,696
1,2,1,0,0,656
1,3,1,2,0,576
1,4,2,1,0,624
1,5,2,0,0,664
1,6,1,2,0,608
1,7,1,0,0,600
1,8,2,1,0,584
1,9,1,0,0,624
1,10,1,1,0,879
1,11,2,2,0,785
1,12,2,1,0,952
1,13,1,2,0,616
1,14,2,1,0,712
1,15,2,2,0,792
1,16,2,0,0,712
1,17,1,1,0,808
1,18,1,2,0,560
1,19,1,0,0,624
2,0,A,0,0,2214
2,1,1,1,0,1583
2,2,P,1,0,1281
2,3,1,2,0,1088
2,4,A,2,0,1296
2,5,1,1,0,1352
2,6,P,1,0,776
2,7,1,2,0,824
2,8,A,0,0,832
2,9,2,1,0,1024
2,10,A,1,0,1656
2,11,1,2,0,928
2,12,P,2,0,824
2,13,1,1,0,911
2,14,A,1,0,937
2,15,1,2,0,1008
2,16,P,0,0,936
2,17,2,0,1,1744
2,18,A,2,0,1040
2,19,2,2,0,752
2,20,P,1,0,1456
2,21,1,1,0,1328
2,22,A,0,0,816
2,23,1,2,0,1704
2,24,A,1,0,1072
2,25,2,1,0,1096
2,26,P,0,0,664
2,27,1,0,0,928
2,28,A,1,0,815
2,29,2,1,0,952
2,30,A,2,0,809
2,31,2,0,0,936
2,32,P,0,0,647
2,33,1,1,0,809
2,34,P,1,0,608
2,35,1,2,0,792
2,36,P,2,0,784
2,37,2,1,0,896
2,38,A,1,0,664
2,39,1,0,0,928
3,0,A,1,0,959
3,1,1,2,0,760
3,2,A,0,0,832
3,3,1,1,0,1008
3,4,A,2,0,704
3,5,1,2,0,800
3,6,P,0,0,631
3,7,1,1,0,736
3,8,P,1,0,576
3,9,1,2,0,631
3,10,P,2,0,712
3,11,2,0,0,664
3,12,A,0,0,671
3,13,2,2,0,800
3,14,A,1,0,672
3,15,1,0,0,719
3,16,A,2,0,632
3,17,1,1,0,720
3,18,P,1,0,632
3,19,1,0,0,664
3,20,A,2,0,1064
3,21,1,2,0,864
3,22,P,0,0,648
3,23,2,0,0,616
3,24,A,1,0,584
3,25,1,1,0,663
3,26,A,2,0,608
3,27,2,2,0,720
3,28,P,0,0,608
3,29,2,0,0,664
3,30,P,2,0,591
3,31,2,2,1,1359
3,32,P,1,0,631
3,33,2,1,1,1257
3,34,A,2,0,1776
3,35,1,0,0,687
3,36,A,1,0,1200
3,37,2,2,0,616
3,38,P,2,0,559
3,39,1,0,0,648
4,0,P,2,0,1033
4,1,A,1,0,848
4,2,P,2,0,679
4,3,A,0,0,816
4,4,A,2,0,879
4,5,P,0,0,767
4,6,A,1,0,849
4,7,P,2,0,1351
4,8,A,1,0,672
4,9,A,0,0,896
4,10,P,1,0,735
4,11,P,2,0,808
4,12,P,1,0,704
4,13,P,2,0,640
4,14,P,1,0,575
4,15,A,0,0,727
4,16,A,2,0,559
4,17,P,0,0,847
4,18,A,1,0,697
4,19,P,2,0,631
5,0,A,1,0,1926
5,1,1,2,0,903
5,2,P,2,0,791
5,3,1,0,0,800
5,4,P,0,0,1208
5,5,2,2,0,872
5,6,P,1,0,776
5,7,1,1,0,1056
5,8,P,0,0,688
5,9,2,2,0,880
5,10,P,1,0,807
5,11,1,0,0,864
5,12,A,0,0,711
5,13,1,2,0,823
5,14,P,2,0,615
5,15,1,1,0,696
5,16,A,0,0,736
5,17,1,0,0,1080
5,18,P,1,0,600
5,19,1,2,0,736
5,20,P,0,0,808
5,21,1,1,0,992
5,22,A,2,0,632
5,23,2,2,0,761
5,24,A,1,0,655
5,25,2,1,0,664
5,26,P,0,0,704
5,27,2,0,0,1030
5,28,A,1,0,873
5,29,2,1,0,1000
5,30,A,2,0,591
5,31,1,0,0,615
5,32,A,1,0,632
5,33,2,1,0,768
5,34,P,2,0,752
5,35,1,2,0,1072
5,36,A,1,0,673
5,37,2,0,0,671
5,38,A,0,0,920
5,39,1,1,0,800
6,0,P,1,0,1335
6,1,1,2,1,1488
6,2,P,2,0,664
6,3,2,1,0,704
6,4,A,1,0,568
6,5,1,0,0,600
6,6,P,2,0,768
6,7,1,1,0,1000
6,8,A,0,0,648
6,9,2,0,0,640
6,10,P,1,0,552
6,11,2,2,0,672
6,12,A,2,0,576
6,13,2,1,0,711
6,14,P,0,0,705
6,15,2,2,0,736
6,16,A,1,0,639
6,17,2,0,0,761
6,18,A,0,0,624
6,19,1,2,0,960
6,20,P,1,0,711
6,21,1,0,0,913
6,22,A,2,0,664
6,23,1,1,0,648
6,24,P,0,0,608
6,25,2,0,0,808
6,26,A,2,0,624
6,27,1,1,0,688
6,28,A,1,0,1336
6,29,1,0,0,504
6,30,P,2,0,960
6,31,2,2,0,584
6,32,A,0,0,560
6,33,2,1,0,616
6,34,P,1,0,647
6,35,2,0,0,705
6,36,A,2,0,1064
6,37,2,2,0,1255
6,38,P,0,0,561
6,39,1,0,0,600
0,0,A,1,0,2392
0,1,P,0,0,1712
0,2,A,1,0,1063
0,3,A,0,0,2056
0,4,P,1,0,1072
0,5,P,0,0,4113
0,6,A,1,0,1207
0,7,A,2,0,848
0,8,P,1,0,1008
0,9,A,2,0,1055
0,10,P,1,0,808
0,11,P,2,0,896
0,12,P,0,0,776
0,13,A,2,0,1112
0,14,A,0,0,1200
0,15,A,1,0,1616
0,16,A,0,0,1816
0,17,P,2,0,704
0,18,P,0,0,848
0,19,P,1,0,728
1,0,2,2,0,1151
1,1,1,1,0,968
1,2,1,2,0,808
1,3,1,0,0,672
1,4,1,1,0,936
1,5,1,2,0,584
1,6,1,1,0,520
1,7,1,2,0,456
1,8,1,1,0,416
1,9,2,2,0,472
1,10,2,1,0,744
1,11,1,0,0,616
1,12,2,1,0,752
1,13,1,2,0,736
1,14,1,0,0,1056
1,15,2,2,0,600
1,16,1,0,0,632
1,17,1,2,1,1008
1,18,2,0,0,1600
1,19,1,2,0,848
2,0,A,0,0,1135
2,1,2,1,0,1263
2,2,P,2,0,865
2,3,1,0,0,1192
2,4,P,1,0,1111
2,5,1,1,0,872
2,6,A,0,0,791
2,7,2,2,0,1257
2,8,A,1,0,1320
2,9,2,1,1,1496
2,10,A,0,1,1807
2,11,1,2,0,1913
2,12,P,1,0,792
2,13,2,1,0,1007
2,14,P,2,0,1169
2,15,2,2,0,863
2,16,A,0,1,1416
2,17,1,1,0,1120
2,18,A,1,0,527
2,19,1,0,0,897
2,20,A,0,0,896
2,21,2,1,0,799
2,22,A,2,1,1104
2,23,2,0,0,816
2,24,P,1,0,1007
2,25,1,2,1,1128
2,26,P,0,1,1432
2,27,1,0,1,1632
2,28,P,1,0,1456
2,29,1,1,1,1439
2,30,P,2,0,1031
2,31,1,2,0,1177
2,32,A,0,1,1632
2,33,2,1,0,719
2,34,P,2,0,1496
2,35,2,0,0,800
2,36,P,0,0,904
2,37,1,2,0,1000
2,38,A,2,1,1512
2,39,2,1,0,1263
3,0,P,1,0,688
3,1,2,1,0,592
3,2,A,2,0,823
3,3,1,2,0,544
3,4,A,1,0,880
3,5,2,0,0,647
3,6,A,0,0,632
3,7,2,2,0,656
3,8,A,1,0,664
3,9,1,0,0,616
3,10,P,2,0,544
3,11,2,2,0,632
3,12,A,0,0,879
3,13,2,0,0,609
3,14,A,1,0,632
3,15,1,1,1,1023
3,16,A,0,0,1032
3,17,1,0,0,576
3,18,A,1,0,576
3,19,1,2,0,472
3,20,A,2,0,440
3,21,2,1,1,824
3,22,A,1,0,831
3,23,2,2,0,520
3,24,A,0,0,704
3,25,1,0,1,791
3,26,P,2,0,1183
3,27,1,2,0,544
3,28,P,0,0,815
3,29,1,0,0,1096
3,30,A,1,0,585
3,31,2,1,0,599
3,32,A,0,0,688
3,33,1,0,1,863
3,34,A,2,0,1856
3,35,1,2,0,585
3,36,P,0,0,671
3,37,1,1,0,744
3,38,A,2,0,935
3,39,1,2,0,576
4,0,P,1,0,1272
4,1,P,0,1,983
4,2,A,2,0,695
4,3,P,0,0,2920
4,4,P,1,0,760
4,5,P,2,0,887
4,6,P,1,0,648
4,7,A,0,1,1047
4,8,A,2,0,648
4,9,P,0,0,1193
4,10,A,1,0,663
4,11,A,0,0,1152
4,12,A,1,0,896
4,13,A,0,0,696
4,14,A,1,0,552
4,15,P,0,0,681
4,16,P,2,0,560
4,17,P,1,0,688
4,18,P,0,0,575
4,19,P,1,0,577
5,0,A,2,0,1047
5,1,1,2,0,1560
5,2,A,0,1,1960
5,3,1,0,0,2176
5,4,P,2,1,1752
5,5,1,2,0,1464
5,6,A,1,1,1440
5,7,1,0,0,1512
5,8,A,0,1,1848
5,9,1,2,1,1560
5,10,P,1,0,3656
5,11,1,0,0,1512
5,12,P,2,0,848
5,13,1,1,0,744
5,14,A,0,0,920
5,15,2,2,0,823
5,16,P,1,0,1080
5,17,2,1,0,824
5,18,P,2,0,888
5,19,2,2,0,1056
5,20,A,1,0,1488
5,21,2,0,0,856
5,22,A,2,0,1176
5,23,2,1,0,648
5,24,P,1,0,744
5,25,2,0,0,248
5,26,A,2,0,2417
5,27,1,2,0,575
5,28,A,1,0,936
5,29,1,1,0,576
5,30,A,2,0,744
5,31,1,2,0,488
5,32,A,0,0,1032
5,33,2,1,0,816
5,34,P,1,0,1416
5,35,2,2,0,736
5,36,A,2,0,953
5,37,2,0,0,815
5,38,P,1,1,1080
5,39,1,1,0,816
6,0,P,1,1,1176
6,1,1,0,0,576
6,2,P,2,0,544
6,3,1,1,0,481
6,4,A,1,0,615
6,5,2,2,0,480
6,6,P,0,0,712
6,7,1,1,0,888
6,8,P,2,0,3488
6,9,2,0,0,768
6,10,P,0,1,1208
6,11,1,1,0,1112
6,12,P,1,1,1056
6,13,2,2,0,1032
6,14,A,0,0,1119
6,15,2,0,0,2336
6,16,A,1,1,1472
6,17,2,2,0,920
6,18,P,2,1,1384
6,19,2,1,0,1080
6,20,A,0,1,1224
6,21,1,2,0,1385
6,22,A,2,0,671
6,23,1,1,0,712
6,24,P,0,0,704
6,25,1,0,0,624
6,26,A,2,0,688
6,27,2,2,1,1193
6,28,A,0,0,1063
6,29,1,0,0,696
6,30,A,2,1,1256
6,31,2,1,1,2136
6,32,A,1,0,2560
6,33,2,2,0,1392
6,34,P,2,1,2680
6,35,2,1,1,1199
6,36,P,0,0,1984
6,37,1,2,0,648
6,38,P,2,0,616
6,39,1,0,0,512
0,0,P,1,0,3159
0,1,A,0,1,2624
0,2,A,2,0,1527
0,3,P,1,0,1209
0,4,A,0,0,1128
0,5,P,2,0,1327
0,6,A,1,0,1688
0,7,P,0,0,2216
0,8,A,2,0,832
0,9,A,0,0,960
0,10,A,1,0,646
0,11,P,0,0,1136
0,12,P,1,0,720
0,13,P,0,0,904
0,14,A,1,0,743
0,15,A,2,0,1144
0,16,P,1,0,601
0,17,P,2,0,984
0,18,P,1,0,647
0,19,P,0,0,1160
1,0,2,1,0,1903
1,1,2,0,0,768
1,2,1,2,0,623
1,3,1,1,0,681
1,4,2,2,0,655
1,5,1,1,0,719
1,6,1,2,0,656
1,7,2,1,0,553
1,8,1,0,0,584
1,9,2,1,0,672
1,10,1,2,0,567
1,11,1,0,0,584
1,12,1,2,0,648
1,13,2,0,0,591
1,14,2,2,0,744
1,15,1,1,0,537
1,16,1,2,0,583
1,17,1,0,0,520
1,18,1,1,0,697
1,19,2,2,0,543
2,0,P,1,0,1199
2,1,1,0,0,864
2,2,A,0,1,1839
2,3,1,1,0,1009
2,4,A,2,1,1255
2,5,2,2,0,753
2,6,P,0,0,1879
2,7,1,0,0,840
2,8,P,1,0,807
2,9,2,2,0,721
2,10,P,0,0,1480
2,11,2,1,0,1023
2,12,P,1,0,688
2,13,2,2,0,801
2,14,A,2,0,856
2,15,1,1,0,575
2,16,A,0,1,1673
2,17,2,0,0,711
2,18,P,1,0,873
2,19,1,1,0,903
2,20,A,0,0,984
2,21,2,2,0,1400
2,22,P,2,0,704
2,23,2,1,0,687
2,24,P,0,0,1160
2,25,2,0,0,792
2,26,P,2,0,656
2,27,2,2,1,1152
2,28,P,0,1,2048
2,29,2,0,0,936
2,30,P,2,0,767
2,31,1,1,0,1016
2,32,P,0,0,760
2,33,1,2,0,1287
2,34,P,1,0,800
2,35,1,0,0,975
2,36,A,2,0,1992
2,37,1,1,0,776
2,38,P,1,0,727
2,39,2,0,0,680
3,0,P,1,0,816
3,1,1,1,0,688
3,2,A,0,0,1255
3,3,1,2,0,736
3,4,P,2,0,617
3,5,2,1,0,784
3,6,P,1,0,647
3,7,2,2,0,960
3,8,P,0,1,1448
3,9,2,0,0,1216
3,10,P,2,0,840
3,11,1,2,0,840
3,12,P,1,0,801
3,13,1,0,0,631
3,14,A,2,0,1000
3,15,2,1,0,608
3,16,P,0,1,2144
3,17,2,0,0,1287
3,18,A,2,0,1865
3,19,2,1,0,1072
3,20,A,1,0,816
3,21,1,0,0,632
3,22,P,2,0,776
3,23,2,2,0,839
3,24,A,1,0,1416
3,25,2,0,0,2207
3,26,P,0,0,1105
3,27,1,2,0,856
3,28,P,2,0,656
3,29,1,1,1,2360
3,30,A,1,0,1831
3,31,1,0,0,881
3,32,A,0,1,1687
3,33,1,2,0,2688
3,34,P,2,0,1993
3,35,1,0,0,879
3,36,A,1,0,1352
3,37,2,1,0,800
3,38,A,2,0,1447
3,39,2,0,0,640
4,0,P,2,0,1496
4,1,A,1,0,1087
4,2,A,0,0,2513
4,3,P,1,0,1240
4,4,A,0,0,2072
4,5,A,1,0,879
4,6,P,0,0,1129
4,7,P,2,0,952
4,8,P,1,0,551
4,9,A,2,0,841
4,10,A,1,0,1055
4,11,P,0,0,1112
4,12,P,1,0,656
4,13,A,2,0,781
4,14,A,0,0,2256
4,15,P,2,0,688
4,16,P,1,0,704
4,17,A,0,0,1321
4,18,P,1,0,695
4,19,A,2,0,832
5,0,P,2,0,1759
5,1,1,0,0,889
5,2,P,1,0,935
5,3,1,1,0,1032
5,4,P,0,0,1184
5,5,1,2,0,793
5,6,A,2,0,647
5,7,2,1,0,648
5,8,P,0,1,1656
5,9,1,2,0,920
5,10,A,1,0,1927
5,11,2,1,0,656
5,12,P,2,0,1087
5,13,1,0,0,592
5,14,P,1,0,617
5,15,2,2,0,631
5,16,A,2,0,761
5,17,1,1,0,631
5,18,A,0,0,761
5,19,1,0,0,719
5,20,A,2,0,840
5,21,2,2,0,623
5,22,A,0,0,752
5,23,1,1,0,704
5,24,P,2,0,815
5,25,1,2,0,609
5,26,A,0,0,688
5,27,2,1,0,1088
5,28,A,2,0,783
5,29,2,2,0,656
5,30,A,1,0,625
5,31,2,0,0,672
5,32,P,2,0,815
5,33,2,1,0,632
5,34,A,1,0,881