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

Separating into columns and rows

Remember the drink ingredients data from the video? You've been given a similar version (drink_df) that also includes quantities and units. Now you want to create an overview of how much of each ingredient you should buy to make these drinks.

The dplyr package has been pre-loaded for you.

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

Reshaping Data with tidyr

ดูคอร์ส

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

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

drink_df %>%
  # Separate the ingredients over rows
  ___
แก้ไขและรันโค้ด