jeudi 20 septembre 2018

ifelse in R - multiple variable assignments

What mistake I am making here? I an trying to assign a and b some value if either three of the statements are true: I am trying to use the ifelse statement:

ifelse(1==1||2==2||3==3,(a<-100,b<-100),(a<-1000,b<-1000)) 

I get: Error: unexpected ',' in " ifelse(1==1||2==2||3==3,(a<-100,"

Aucun commentaire:

Enregistrer un commentaire