Load the murders
dataset
1. Use as_tibble
to convert the murders
data table into a tibble
and save it in an object called murders_tibble
.
2. Use the group_by
function to convert murders
into a tibble that
is grouped by region. Save in an object called murders_grouped
.
3. Write tidyverse code that is equivalent to this code:
exp(mean(log(murders$population)))
and save the result in an object called pipe_output
.
Write it using the pipe so that each function is called without
arguments. Use the dot operator to access the population. Hint: The code
should start with pipe_output <- murders %>%
.