Ride duration constraints
Values that are out of range can throw off an analysis, so it's important to catch them early on. In this exercise, you'll be examining the duration_min column more closely. Bikes are not allowed to be kept out for more than 24 hours, or 1440 minutes at a time, but issues with some of the bikes caused inaccurate recording of the time they were returned.
In this exercise, you'll replace erroneous data with the range limit (1440 minutes), however, you could just as easily replace these values with NAs.
dplyr, assertive, and ggplot2 are loaded and bike_share_rides is available.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Cleaning Data in R
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Create breaks
breaks <- c(___, 0, 1440, ___)
# Create a histogram of duration_min
ggplot(___, aes(___)) +
___(breaks = ___)