DEV Community

Discussion on: Daily Challenge #16 - Number of People on the Bus

Collapse
 
yzhernand profile image
Yozen Hernandez

R

# Read in data, somehow. Likely into a data.frame
bus_data <- data.frame(on = c(1, 2, 5, 4), off = c(0, 1, 3, 2))
sum(bus_data$on - bus_data$off)
# [1] 6