開始使用免費開始

is-dot 函式

現在,你要來看看怎麼使用「is-dot」函式。在這個練習中,你會取得 weekends,也就是 2019 年所有週末天數的向量,並根據 is-dot 函式的測試結果,完成一個邏輯運算式。

已為你載入 weekends 物件與 lubridate 套件。

本練習屬於課程

在 R 中操作時間序列資料

檢視課程

練習說明

  • 輸入正確的「is-dot」函式,讓 if 敘述印出成功訊息。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Use the correct is-dot function to print the statement below

if (___) {
  print("You found the class of the weekends object!")
}
編輯並執行程式碼