samedi 21 novembre 2020

Clever if in R like in c++

Is there is a way in R language to write a fast IF like in C++:

if (a==b)
    return 1
else
    return 0
// Fast way
(a==b ? 1 : 0)

Aucun commentaire:

Enregistrer un commentaire