I am using R..
I have a dataframe about reservations in a transportation company:
| Van | Route | Departure | Price | Customer ID | 
|---|---|---|---|---|
| U21 | LA - SF | 8:00:00 | 30.00 | 467866578 | 
| U21 | LA - SF | 8:00:00 | 30.00 | 234656433 | 
| U21 | LA - SF | 8:00:00 | 30.00 | 654343554 | 
| U21 | LA - SF | 8:00:00 | 30.00 | 466534444 | 
| U21 | LA - SF | 8:00:00 | 30.00 | 354543433 | 
| U22 | LA - SD | 6:00:00 | 20.00 | 345464533 | 
| U22 | LA - SD | 6:00:00 | 20.00 | 345456777 | 
| U22 | LA - SD | 6:00:00 | 20.00 | 344565411 | 
| U22 | LA - SD | 6:00:00 | 20.00 | 119873566 | 
I would like to make a new data frame that shows this:
| Van | Route | Departure | Price | Tickets Sold | Revenue | 
|---|---|---|---|---|---|
| U21 | LA - SF | 8:00:00 | 30.00 | 5 | 150.00 | 
| U22 | LA - SD | 6:00:00 | 20.00 | 4 | 80.00 | 
Thanks in advance!!!!! Please help :)
 
     
     
    