mardi 27 février 2018

In R if(condition) gives an error "argument is of length zero

in R I have the following if statement if(x==0){...} which gives an error argument is of length zero Debugging using print(x) gives named numeric(0)

command line seems to work OK

> x<-0
> if(x==0){x<-1}
> x
[1] 1
> 

Please help in making me understand what is going wrong. Thanks

Aucun commentaire:

Enregistrer un commentaire