在R添加时间戳?
it1352
帮助1人
问题说明
我有一个数据,其中包含事件的开始时间和结束时间之间的差异.现在我想添加差异.问题是时差的格式是
I have a data which have the difference between the start and end time of an event. Now I want to add the difference. the problem is the difference time is in format
difference_time
_______________
00:10:00
00:30:12
01:09:09
00:09:03
01:09:30
01:09:03
00:09:08
01:00:09
09:00:01
但是如果我执行 sum(df$difference_time)
它会抛出无效类型争论的错误.
But if I do sum(df$difference_time)
it throws the error that invalid type of arguement.
我希望结果类似于以下格式:
I want the result to be something like below format:
51975 秒.任何帮助表示赞赏
51975 seconds. Any help is appreciated
更新:
我尝试了 period_to_seconds(hms(df$difference_time))
并且它工作正常
I tried period_to_seconds(hms(df$difference_time))
and it works fine
正确答案
#1
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /reply/detail/tanhcfecbg
系列文章
更多
同类精品
更多
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
检查邮件是否发送成功
it1352 07-25 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
Android微调工具-删除当前选择
it1352 06-20 -
希伯来语的空格句子标记化错误
it1352 06-22 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20