ich krieg es nicht hin,einen Faktor in ein passenden Format (numeric?posixct?) umzuwandeln, so dass ich anschließend 10 min Intervalle zu 30 min Intervalle aufsummieren kann.
Code: Alles auswählen
id <- c(1,2,3)
time <- c("00:10", "00:20", "00:30")
df <- data.frame(id,time)
Code: Alles auswählen
df$time <- chron(times = df$time, format "h:m")
Dasselbe Problem habe ich, wenn ich die Faktoren in Character umwandel.
Code: Alles auswählen
time2<-c("00:00", "01:02", "09:30", "14:15")
x <- chron(times=time2, format = "h:m")
Wo liegt das Problem? Ich hab es auch schon mit anderen Formaten probiert und in anderen Foren gesucht, aber nichts gefunden. Die anderen Lösung hatten strings mit dem format "hh:mm:ss" also mit Sekunden. Ich habe nur "hh:mm" Ich hoffe, ihr könnt mir helfen! Danke!