am trying EM method by weight in R but i get the following error which i have got stuck in : Error in group.indicator[i] <- which(unique.indicator == indicator[i]) : repl