Hello All,
I have this version and machine
R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)
I have a simple issue need your kind support
I have below df
Rows: 131,573
Columns: 6
ride_id <chr> "70B6A9A437D4C30D", "158A465D4E74C54A", "5262016E0F1F2F9A", "BE119628E44F871E", "69AF~
started_at 2020-12-27 12:44:29, 2020-12-18 17:37:15, 2020-12-15 15:04:33, 2020-12-15 15:54:18, ~
ended_at <dttm> 2020-12-27 12:55:06, 2020-12-18 17:44:19, 2020-12-15 15:11:28, 2020-12-15 16:00:11, ~
start_station_id 13157, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA~
end_station_id <int> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N~
member_casual "member", "member", "member", "member", "member", "member", "member", "member", "memb~
I use
Divvy_trips_q1 <- mutate(Divvy_trips_q1, ride_length = ended_at - started_at) ## to calculate difference between ended_at and started_at but the output was in seconds and I wan to be in mins I try to use dmins and as.duration but nothing change
dminutes(Divvy_trips_q1 $ride_length = 1)
Error: unexpected '=' in "dminutes(Divvy_trips_q1 $ride_length ="
or
dminutes(Divvy_trips_q1 $ride_length)
Error in initialize(value, ...) :
cannot use object of class “difftime” in new(): class “Duration” does not extend that class
So, How I can have output in mins?
Thanks in advance.
M.Salah