0

I have a data frame in R with a column with values from 1 to 711. Each value is repeated multiple times. I want to replace each value with a specific DATE.

df <- data.frame(col1 = c(1,1,1,1,1,2,2,2,4,5,5,2,3) #711 values and total 
      entries = 300000
df1 <- data.frame(col2 = c("01-01-2014","02-01-2014","03-01-2014",04-01- 
       2014","05-01-2014") #711 unique dates

#Value 1 should be replaced by "01-01-2014"
#Value 2 should be replaced by "02-01-2014"
#......
#Value 711 should be replaced by "12-12-2015"
Rohan Bali
  • 109
  • 6

0 Answers0