Answer each of the following questions using the iterative techniques covered in lecture. Be sure to display all your code in the rendered version (use echo: true throughout1).
Exercises
Question 1:
Compute the number of unique values in each column of palmerpenguins::penguins2.
Question 2:
Compute the mean of every column in mtcars.
Question 3:
Group diamonds by cut, clarity, and color then count the number of observations and compute the mean of each numeric column.
Question 4:
What happens if you use a list of functions in across(), but don’t name them? How is the output named?
Question 5:
Explain what each step of the following pipeline does. If you haven’t seen the function before, look up its help page to learn the specifics of what it does.