Konvertieren von char in Datumszeit
In einem data.frame habe ich einen Datums- / Uhrzeitstempel in der Form:
head(x$time)
[1] "Thu Oct 11 22:18:02 2012" "Thu Oct 11 22:50:15 2012" "Thu Oct 11 22:54:17 2012"
[4] "Thu Oct 11 22:43:13 2012" "Thu Oct 11 22:41:18 2012" "Thu Oct 11 22:15:19 2012"
Immer wenn ich versuche es mit umzuwandelnas.Date
, Schmiermittel, oderZoo Ich bekommeNA
s oder Fehler.
Wie kann man diese Zeit in eine lesbare Form umwandeln?
Ich habe es versucht:
Time<-strptime(x$time,format="&m/%d/%Y %H:$M")
x$minute<-parse_date_time(x$time)
x$minute<-mdy(x$time)
x$minute<-as.Date(x$time,"%m/%d/%Y %H:%M:%S")
x$minute<-as.time(x$time)
x$minute<-as.POSIXct(x$time,format="%H:%M")
x$minute<-minute(x$time)