Last active
May 29, 2019 09:47
-
-
Save terashim/c24e29d75a5d7fa1058868c0aefaabfc to your computer and use it in GitHub Desktop.
10日おきに12:00の時刻ベクトルを生成
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# サンプルコード: 10日おきに12:00の時刻ベクトルを生成 | |
library(tidyverse) | |
library(lubridate) | |
# 日付のベクトルを作成 | |
sent_time <- seq(as_date("2018-01-01"), as_date("2019-12-31"), by = "10 days") | |
# POSIXct型に変換 | |
sent_time <- as_datetime(sent_time) | |
# 12時間をプラス | |
sent_time <- sent_time + hours(12) | |
# 確認 | |
class(sent_time) | |
sent_time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment