lundi 26 octobre 2015

Error mensagem in R: Error in if (any(proz <- pro == 0)) { : missing value where TRUE/FALSE needed

#20 points

N1=10.0
D1<-c()
Nf1<-c() 
for(j in 0:20)
{
    m2=j/5
    D1[j]=abs((m1-m2)/sd1)
    Nd1=0
    x1<-c(rnorm(N1,m1,sd1),rnorm(N1,m2,sd2))
    for(k in 1:1000)
    {
        f=sample(x1,length(x1),replace=TRUE)
        mod<-densityMclust(f)
        if(mod$G==2)
        {
            Nd1=Nd1+1
        }
    }
    Nf1[j]=Nd1*0.1
}

Error in if (any(proz <- pro == 0)) { : missing value where TRUE/FALSE needed

Aucun commentaire:

Enregistrer un commentaire