www.linkedin.com/in/francis-ngegba-740887287
I need help in separating columns as shown below:
year22$date <- as.Date(year22$started_at)
year22$year <- format(as.Date(year22$date), "%Y")
year22$month <- format(as.Date(year22$date), "%m")
year22$weekday <- wday(year22$date, label=TRUE)
year22$hour <- format(year22$started_at, format = "%H")
year22$ride_length <- (year22$ended_at - year22$started_at)
year22 <- year22 %>%
filter(ride_length > 0)
It keeps giving my errors as shown below:
Error in charToDate(x): character string is not in a standard unambiguous format
Traceback:
- as.Date(year22$started_at)
- as.Date.character(year22$started_at)
- charToDate(x)
- stop("character string is not in a standard unambiguous format")
Appreciated in advance for your help.