.
How can I sum the time of all the "Customers" individually, and then get another value for all the subscribers? I've tried using sort
on this data frame to be able to break apart the data that way, but it did not work.
So for example, if I want to know the total amount of Customer Trip Times, I can get that value individually, and likewise, the same thing for subscribers.
CodePudding user response:
We can use aggregate
aggregate(trip_time ~ type, df1, FUN = sum)