เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Bond... James Bond

You've been given a James Bond movie dataset (bond_df) and want to visualize the number of movies that Bond actors have featured in per decade. However, the data is in an untidy format with the decade values captured in the column headers. You'll tidy this dataset to give each variable its own column.

The ggplot2 package has been pre-loaded for you.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Reshaping Data with tidyr

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

bond_df %>% 
  # Pivot the data to long format and set the column names
  ___
แก้ไขและรันโค้ด