Question: The dplyr function filter is used to choose specific rows of the data frame to keep. Unlike select which is for columns, filter is for
The dplyr function filter is used to choose specific rows of the data frame to keep.
Unlike select which is for columns, filter is for rows. For example, you can show just the
New York row like this:
filtermurders state "New York"
You can use other logical vectors to filter rows.
Use filter to show the top states with the highest murder rates. After we add murder
rate and rank, do not change the murders dataset, just show the result. Remember that you
can filter based on the rank column
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
