Type Network Show Placement Cost Dates (chr)
VVVV AJSS XGAF BHGHF 103.00 3/21,3/23
I have data that looks like the above data frame snippet. I need to look at the Dates column and depending on the number of dates designated in the observation (always in the format that is separated by comma like so: 1/20,1/23,1/30) I need to replicate the row for unique dates separated by a comma. At the end of it all the above snippet should be transformed into the following.
Type Network Show Placement Cost Dates (chr)
VVVV AJSS XGAF BHGHF 103.00 3/21
VVVV AJSS XGAF BHGHF 103.00 3/23
There are a number of solutions I already have to generate a count of "," which I could then use to replicate row count, but having trouble getting unique dates into the date column. I would like to stick with base R if possible, but am open to any and all packages if it is whats needed to accomplish the goal.
FOR CLARITY: For the duplicate flag. I know how to replicate rows, but how do I apply unique dates that are split by a comma to each newly created row?
Thank you in advance and please call out any additional info that is necessary and I will provide.