Exercises 2 - if else

Files Corresponding to Short Course Programming in R

Exercises 2 - if else

FizzBuzz is a common programming problem https://en.wikipedia.org/wiki/Fizz_buzz used to practice if statements and division.

For our version, create a vector test_vec of the numbers 1 to 50 (1:50). Then apply the following rules using dplyr::if_else statements to obtain the appropriate behavior:

Notes: