Turns out it was really easy since your lines converted my data in POSIXct.
Thanks again for your time.
--
View this message in context:
http://r.789695.n4.nabble.com/Splitting-row-in-function-of-time-tp4077622p4101192.html
Sent from the R help mailing list archive at Nabble.com.
_
Thank you for the quick and precise answer.
I am sorry for the very slow reply. I've been really busy lately.
The lines you sent me work pretty well although my graphs still seem to
consider periods that end with 00:00:00 as part of another day, probably
because of the date. I'm currently trying
Try this: (it would have been easier if you had used 'dput' on your data)
x <- read.table('/temp/example.txt', skip = 1, as.is = TRUE)
# convert to POSIXct
x$beg <- as.POSIXct(paste(x$V4, x$V5))
x$end <- as.POSIXct(paste(x$V6, x$V7))
# determine breaks over midnight
x$over <- format(x$beg, "%d")
Hello all,
I have a data frame that looks like this:
http://r.789695.n4.nabble.com/file/n4077622/Capture.png
I would like to know if it's possible to split a single row into two rows
when the time frame between "beg" and "end" overlaps midnight. I want to
compare the frequency of each activity
4 matches
Mail list logo