Riding_time
Hi everyone,
I tried running the below codes and I'm getting an error message. Checking if anyone can help prefer a solution. Looking forward to your feedback. Thanks!
Code:
clean_dfs <- new_binded_dfs_no_dups
clean_dfs <- clean_dfs %>%
mutate(riding_time = as.numeric(end_hours-start_hours)/60)
clean_dfs
Error Message:
Error in mutate(): ! Problem while computing riding_time = as.numeric(end_hours - start_hours)/60. Caused by error: ! object 'end_hours' not found Backtrace: 1. clean_dfs %>% ... 3. dplyr:::mutate.data.frame(...) 4. dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env()) 6. mask$eval_all_mutate(quo)
[image] Show Traceback
Error in mutate(., riding_time = as.numeric(end_hours - start_hours)/60) : Caused by error: ! object 'end_hours' not found.
Note:
Kindly note that I had previously created the 'start_hours' & 'end_hours' columns using the below codes:
Start_hours & End_hours
clean_dfs <- clean_dfs %>%
mutate(start_hours=strftime(clean_dfs$started_at, format = "%H:%M:%S",tz = "UTC"))
clean_dfs <- clean_dfs %>%
mutate(end_hours=strftime(clean_dfs$ended_at, format = "%H:%M:%S",tz = "UTC"))
clean_dfs