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

Distribution of payment type

An interesting categorical variable in the data having to do with payments is the payment type. This has four possible values: Card, Cash, Disputed, and Unknown. A bar chart of the frequency of each of these values can help us understand the prevalence of different payment methods.

tx is available for you in your workspace.

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

Visualizing Big Data with Trelliscope in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Use a bar chart to plot the frequency distribution of payment_type.

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

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

library(ggplot2)

# Create a bar chart of payment_type
ggplot(___, aes(___)) +
  ___
แก้ไขและรันโค้ด