Re: [R] time mathematics

2018-11-20 Thread Bjørn-Helge Mevik
Well, this is not an elegant (or robust) solution, but this would work for the example you give, at least: starttime <- as.POSIXct("2018-11-20 23:01:18") # Just pick a random date format(starttime + c(0:4), format = "%T") There are probably better ways. :) -- Regards, Bjørn-Helge Mevik signat

Re: [R] time mathematics

2018-11-20 Thread Enrico Schumann
On Tue, 20 Nov 2018, Knut Krueger writes: > I have an dataframe from with a given time format: > > "23:01:19" > > to change some given data: > > x=data.frame > ("Y"=c(1:5),"TIME"=c("23:01:18","23:01:18","23:01:18","23:01:18","23:01:18")) > > I need to change the time increasing in seconds > > x=d

[R] time mathematics

2018-11-20 Thread Knut Krueger
I have an dataframe from with a given time format: "23:01:19" to change some given data: x=data.frame ("Y"=c(1:5),"TIME"=c("23:01:18","23:01:18","23:01:18","23:01:18","23:01:18")) I need to change the time increasing in seconds x=data.frame ("Y"=c(1:5),"TIME"=c("23:01:18","23:01:19","23