jeudi 7 novembre 2019

why is ifelse function producing NA

ifelse statement producing NA

m <- tracking_new_table$CowId=="807439" ifelse (m==T , tracking_new_table$V1=="8","")

I am supposed to get "8" in column VI when the condition is satisfied. Instead I am getting NA´s. In other rows where condition is NOT satisfied, I get "" which is what I wanted.

Aucun commentaire:

Enregistrer un commentaire