Tausend Dank für die ganze Hilfe!
Ich habe den neuen Debug-Code hinzugefügt und bekomme folgende Fehlermeldung:
> computeScIAT(data$IM01i0)
[1] "1"
int [1:24, 1:2] 557 588 599 620 560 579 561 498 492 536 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:24] "trial" "trial" "trial" "trial" ...
..$ : NULL
NULL
[1] "2"
int [1:24, 1:2] 744 519 659 604 589 596 522 659 515 703 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:24] "trial" "trial" "trial" "trial" ...
..$ : NULL
NULL
[1] "3"
int [1:24, 1:2] 602 618 547 632 502 556 645 561 650 583 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:24] "trial" "trial" "trial" "trial" ...
..$ : NULL
NULL
[1] "4"
int [1:24, 1:2] 768 520 881 559 548 593 988 814 665 726 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:24] "trial" "trial" "trial" "trial" ...
..$ : NULL
NULL
[1] "5"
int [1:24, 1:2] 640 981 840 648 682 743 677 617 858 603 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:24] "trial" "trial" "trial" "trial" ...
..$ : NULL
NULL
[1] "6"
int [1:24, 1:2] 795 811 555 904 749 671 769 898 832 607 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:24] "trial" "trial" "trial" "trial" ...
..$ : NULL
NULL
Fehler in 1:nrow(a) : Argument der Länge 0
Mit derselben Debug location:
function(a) {
r = c();
for (i in 1:nrow(a)) {
if (a[i,1] == F) {
r[i] = F;
} else {
r[i] = a[i,1];
}
}
return(r);
}