R の日付入門

金融のための中級R

Lore Dirick

Manager of Data Science Curriculum at Flatiron School

学習内容

  • if 文
  • ループ
  • 関数
  • ファイナンス例
金融のための中級R

今日の日付

today <- Sys.Date()
today
"2017-03-14"
class(today)
"Date"
金融のための中級R

日付クラス

  • Date
    • 暦日
    • "2017-03-14"
  • POSIX - Portable Operating System Interface
    • POSIXctPOSIXlt
    • 日付 + 時刻 + タイムゾーン
    • "2017-03-14 10:00:21 EDT"
金融のための中級R

日付の作成

character_date <- "1957-03-04"

class(character_date)
"character"
sp500_birthday <- as.Date(character_date)

sp500_birthday
"1957-03-04"
class(sp500_birthday)
"Date"
金融のための中級R

演習に進みましょう

金融のための中級R

Preparing Video For Download...