Conditional transformations (4)

The different outcomes must be compatible types!

Some examples:

  • numerical and logical
  • strings and factors.
  • NA is compatible with everything.