As I am dealing with 1000s of rows, this code took me 4-5 min to complete it with other operations.
I will be grateful if anyone could provide an alternative way to get faster or how can I avoid using $ in the above code.
Can you give us a description of the overall problem or analysis you are tackling?
I suspect that there are a number of ways to do what you want and all easier than that add_row command.
For example, here is a simple way to generate a series of times and dates
library(lubridate)
seq(from = ymd_hm("2000-01-01 00:00"), to = ymd_hm("2000-12-30 11:59"), by = "10 min")
Does this mean that you have those data or that you need to create the data?
Thank you for the data but I still do not understand what you are doing in substantive terms . Are you saying that for every timedate you want to add a date that is 10 minutes greater? Thus doubling the number of timedates but only changing the overall timedate range by + 10 minutes?