0

How to store the result of which postcode has the most occurrences of illness? I create a table contain postcode and the occurrences of themselves. But I don't know what to do next

enter image description here

this is the head 5 rows of dataset enter image description here

  • 1
    Could you please include a sample of your data using `dput(oswego_address_separate`. Please don’t use images of data as they cannot be used without a lot of unnecessary effort. Questions should be reproducible. Check out stack overflow guidance: [reproducible examples](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Peter Aug 26 '21 at 08:16

1 Answers1

1

I made sample data dummy, as.table(c(2,1,1,1,2,3)) which is like

A B C D E F 
2 1 1 1 2 3

Simply using which.max(), which.max(dummy) prints

F 
6

in your case, which.max(ill2) is what you want

Park
  • 14,771
  • 6
  • 10
  • 29