I'm curious about what would be a more succinct way to achieve this:
nyc_crashes %>% filter(
`NUMBER OF PERSONS INJURED` >= 1 |
`NUMBER OF PERSONS KILLED` >= 1 |
`NUMBER OF PEDESTRIANS INJURED` >= 1 |
`NUMBER OF PEDESTRIANS KILLED` >= 1 |
`NUMBER OF CYCLIST INJURED` >= 1 |
`NUMBER OF CYCLIST KILLED` >= 1 |
`NUMBER OF MOTORIST INJURED` >= 1 |
`NUMBER OF MOTORIST KILLED` >= 1
)
Could I use string matching for "INJURED | KILLED" and not have to write a different condition for each column name?