`summary()` function returning unexpected output

summary(all_trips_v2$ride_length)

Trying to get statistical summary using above code, but this is what I am getting,
Length Class Mode
3136598 difftime numeric
If I use > mean(all_trips_v2$ride_length)
Time difference of 1477.222 secs

median(all_trips_v2$ride_length)
Time difference of 674 secs
max(all_trips_v2$ride_length)
Time difference of 10632022 secs
max(all_trips_v2$ride_length)
Time difference of 10632022 secs
summary(all_trips_v2$ride_length)

it all works fine.I checked for NA and the class is defo difftime.what is going wrong here?

Hi @notmad_nomad ,

How is the output different from what you were expecting to see?

Length Class Mode
3136598 difftime numeric

above is what I am getting when I run summary, instead of giving me the mean,median,min,max

i figured out wats wrong, ride length column was difftime class,once I converted it to numeric it was fine.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.