5.4 Quiz answers
ifworks with scalars;ifelse()works with vectors.When
xisTRUE,ywill be3; whenFALSE,ywill beNULL; whenNAthe if statement will throw an error.This
switch()statement makes use of fall-through so it will return 2. See details in Section 5.2.3.