I have the following data frame:

```
library(hydroGOF)
library(ModelMetrics)
library(dplyr)
Date_from <- c("2013-01-01","2013-01-04","2013-01-06","2013-01-11")
Date_to <- c("2013-01-03","2013-01-06","2013-01-10","2013-01-14")
Parameter <- c("Par1","Par1","Par1","Par1")
conc<-c("1.5","2.5","1.5","1.8")
metals<-data.frame(Date_from,Date_to,Parameter,conc)
metals$Date_from<-as.Date(metals$Date_from)
metals$Date_to<-as.Date(metals$Date_to)
metals$conc<-as.numeric(as.character(metals$conc))

```

I need to detect the wrong starting date in a date range. In this example it would be the third range starting from 2013-01-06 which is the end date of the second date range. I need the code to detect this and adjust the starting date one day after the end of the previous date range. The result should look like this:

```
Date_from    Date_to Parameter conc
2013-01-01 2013-01-03      Par1  1.5
2013-01-04 2013-01-06      Par1  2.5
2013-01-07 2013-01-10      Par1  1.5
2013-01-11 2013-01-14      Par1  1.8

```