I'm wondering why ifelse(1<2,print("true"),print("false")) returns
ifelse(1<2,print("true"),print("false"))
[1] "true" [1] "true"
whereas ifelse(1<2,"true","false") returns
ifelse(1<2,"true","false")
[1] "true"
I don't understand why the print within ifelse returns "true" twice
print
ifelse
"true"
Aucun commentaire:
Enregistrer un commentaire