I really apologize for the question but I am new to R. I have a dataframe with 2 columns. The first column contains names and the second one a string of dates in text format ("YYYYMMDD"). I am trying to split the string in the second column and get the closest day to today for every row in the dataframe. Below is a sample of the dataframe:
Column 1 Column2
Name 1 20190607,20200901,20211203
Name 2 20190607,20200901,20211203
The end result should look like the sample dataframe but with a column to the right showing the dates closest to today. In this example it would be 20211203. Thank you in advance for any help