plot( as.numeric(d2$hour), d2$ave.num.injuries,
pch=19, type="b", cex=2, bty="n",
xlab="Hour of the Day",
ylab="Ave. Number of Passengers Hurt",
main="Average Injuries or Fatalities Per Harmful Crash")
dat %>%
group_by(hour) ???????????? # ???? how to put a code to this part
summarize( ) ???????????? # ????? and this .
plot(type = "b",
bty = "n",
pch = 19,
cex = 2,
xlab = "Hour of the day",
ylab = "Proportion of accidents resulting in harm",
main = "Proportion of crashes that result in injuies or fatalities")
I try to follow the guide on the syllabus
example plotting code
plot( as.numeric(d2$hour), d2$ave.num.injuries, pch=19, type="b", cex=2, bty="n", xlab="Hour of the Day", ylab="Ave. Number of Passengers Hurt", main="Average Injuries or Fatalities Per Harmful Crash") dat %>% group_by(hour) ???????????? # ???? how to put a code to this part summarize( ) ???????????? # ????? and this . plot(type = "b", bty = "n", pch = 19, cex = 2, xlab = "Hour of the day", ylab = "Proportion of accidents resulting in harm", main = "Proportion of crashes that result in injuies or fatalities")