2
我正试图使用软件包lubridate计算R中每分钟的费率。下面是I'be尝试:使用lubridate计算每分钟费率
library(lubridate)
time <- ms(c("5M 17S", "4M 29S", "5M 0S", "5M 0S", "5M 20S"))
count <- sample(1:20, 5)
count/time
这引发错误:
Error in count/time : Cannot divide numeric by period
如何计算每分钟的速度?我的解决方案后,特别是使用lubridate包