I have been trying to run this code (below here) and I have getting this error:
for(i in 1:length(qid2))
{
for(j in 1:length(qid))
{
if (qid2[i]==qid[i])
{
correct.option[i] = aid[j+cid[j]]
print(correct.option[i])
}
}
}
Error in if (qid2[i] == qid[i]) { : missing value where TRUE/FALSE needed
for( ... )orif( ... )and{with enter/return; keep them on the same line.ifandforcan work without the braces if there's more on the same setup line, so it makes it much easier to accidentally mess up your code. - alistaire