Convert the data frame having month, year and count columns to time series [r] : I have a data frame with columns `month, year, count`.[dataset][1]
Now how can I convert this data frame to time series(from `data frame` class to `ts` class). So that final output should be like this [enter image description here][2].


I tried to use answer from [this][3] question. But I didn't get the proper answer. I also tried to use aggregate functions but I am stuck. 


  [1]: https://i.stack.imgur.com/uL1zK.png
  [2]: https://i.stack.imgur.com/vaJak.png
  [3]: https://stackoverflow.com/questions/44996756/convert-data-frame-to-time-series-in-r