Question: Create a function which takes as input the name of a US state, and returns the following text: if the number of assaults is is

Create a function which takes as input the name of a US state, and returns the following text: if the number of assaults is is higher than the median state number of assaults, print [state name] has a higher than average number of assaults. If its number of assaults is not higher than the median number of assaults, print [state name] has a lower than average number of assaults. Use the dataset USArrests in the datasets package.


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!