mercredi 20 juin 2018

Creating Dummy Data

what is the difference between ==1 and ==-1 in these following codes? mydata1=data.frame(State=ifelse(sign(rnorm(6))==-1,"Mina","Mani"),Q1=sample(1:6)) mydata2= data.frame(State=ifelse(sign(rnorm(6))==1,"Mina","Mani"),Q1=sample(1:6))

Aucun commentaire:

Enregistrer un commentaire