0

I have a vector in R with sorted times (00:00 up until 23:59). Each one represents one phone call made in that minute. It has 1440 levels (24*60).

times <- c(00:00, 00:00, 00:00, 00:01, 00:01, 23:58, 23:58, 23:59)

This simplified example should yield:

quantity <- (3,2,2,1)

I want to create a vector that tells me the quantity of phone calls made at each minute. This would be a vector of length 1440 that would contain the quantity of calls made at 00:00, the quantity of calls made at 00:01, ...., the quantity of calls made at 23:29.

I'm hoping that I could somehow incorporate the fact that my vector understands it has 1440 levels to create this new vector.

Thanks!

Katya Willard
  • 2,152
  • 4
  • 22
  • 43

0 Answers0