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
Get step-by-step solutions from verified subject matter experts
