Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.33 KB | None | 0 0
  1. # The name of the state with the maximum population is found by doing the following
  2. murders$state[which.max(murders$population)]
  3.  
  4. # how to obtain the murder rate
  5. murder_rate <- murders$total / murders$population * 100000
  6.  
  7. # ordering the states by murder rate, in decreasing order
  8. murders$state[order(murder_rate, decreasing=TRUE)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement