I have a dataset that looks similar to this, I would like to create a script that counts the number of times "2016" appears in a date, 2017, 2018 and so on. Then will output how many times that occurred. Essentially I have a bunch of dates, that I would like to graph how many times that date occurred for this kind of dataset. Provided I have linked an example of what my dataset would look like.
Normally, I'd have suggested converting the Incident.date object to a dttm object, from which you can easily extract the year for summarization. However, the second entry is malformed: 1/12016
So, I'd use stringr to strip everything except the last four digits