Load the dplyr package and the murders dataset. You can add columns using the dplyr function mutate. This function is aware of the column names and inside the function you can call them unquoted: We...


Load the dplyr package and the murders dataset.


You can add columns using the dplyr function mutate. This function is aware of the column names and inside the function you can call them unquoted:


We can write population rather than murders$population. The function mutate knows we are grabbing columns from murders.


Use the function mutate to add a murders column named rate with the per 100,000 murder rate as in the example code above. Make sure you redefine murders as done in the example code above ( murders <->



May 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here