在 R 中的日期 POSIXCT 中加入公差

发布于 2025-01-20 11:51:08 字数 222 浏览 4 评论 0原文

我有两个DataFrames D1和D2,需要与左联接合并。加入必须同时在4个变量上同时完成:x1,x2,x3和x4。这些变量都是两个数据帧中的4个。但是,对于变量X4,它表示Posixct格式的日期(D1和D2中的相同格式),并且我必须以以下公差将其附加:提前-1分钟,+5分钟延迟。

Left_join(D1,D2,..)

我是R的初学者,我在小组中搜索,但我没有找到已经提出的答案!谢谢你帮助我

I have two dataframes D1 and D2 that I need to merge with a left join. The join must be done at the same time on 4 variables: X1, X2, X3 and X4. These variables are all 4 present in the two data frames. However, for the variable X4 it represents a date in POSIXCT format (the same format in D1 and D2) and I must attach it with the following tolerance: -1 minute in advance, and +5 minutes late.

left_join(D1,D2,..)

I am a beginner on R and I searched in the group but I did not find an answer already proposed! thank you for helping me

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文