I have a df like this

```
    month   day   x
1   1        1    84
2   1        2    43
3   1        3    49
4   1        4    67
5   1        5    59
......
366 12       31   97

```

The year should be 2019 from Oct-Dec and 2020 from Jan-Sep

I tried to use

```
df$year<-as.date(df,origin='2019-01-01')

```

But I am not sure how to make an argument.

I want the year column to get a date column and try then

```
df$date<-as.date(with(paste("???",month,day,sep="-"), %Y-%m-%d,origin ="2019-01-01")

```

but again I don't know how to make an argument for year

Please any help would save me a lot of time because doing it manually seems impossible