I'm new to rstudio and so this might have a very simple answer. I have imported a table with 12000+ rows. One of my columns has different dates in a "year-month-day" format and I want to split this one column into three separate year, month, and day columns in order to do some analysis using only the months. I've seen numerous answers to this question but none seem to be working for me. How can I convert so many rows into separate columns without writing each date out separately.
It may be important to note that the column I am trying to convert is in date formate as "Y%-m%-%d".
The table I have imported looks like this:
date_observed latitude Range
1 2018-03-04 9.934524 "6 to 15"
2 2019-06-20 9.942766 "6 to 15"
3 2018-07-07 14.007714 "6 to 15"
...
12408 2019-06-05 70.67493 "66 to 75"
I want it to look like this:
year month day latitude Range
1 2018 03 04 9.934524 "6 to 15"
2 2019 06 20 9.942766 "6 to 15"
3 2018 07 07 14.007714 "6 to 15"
...
12408 2019 06 05 70.67493 "66 to 75"