philchalmers / mirt

Multidimensional item response theory
https://philchalmers.github.io/mirt/
199 stars 75 forks source link

small coding mistake #179

Closed jessekps closed 4 years ago

jessekps commented 4 years ago

Hi,

I was walking through the mirt code for a different reason but I saw this line that appears to be a mistake. Pretty sure you meant the == 2L to be outside the brackets.

line 353 in multipleGroup.r

if(sum(invariance.check == 2L) && length(constrain) == 0){

philchalmers commented 4 years ago

Thanks, it looks like reference of an old coding approach that was using a different mechanism. The sum() doesn't actually do anything now since it gets coerced into a logical automatically, but I'll patch the code since this does look a little weird.