Open ecking opened 4 years ago
So I got the plot to work with the selection of the street... for the most part. When I change the picklist value the plots change. But I'm not entirely sure how to figure out why/what the graph is actually populating. It should be the harmcount which is total injury plus total fatalities. Ideas on how to figure this out?
`dat12 <- input$Street dat.street <- filter(dat, StreetName == dat12)
plot.new()
plot.window(xlim = c(0, 24), ylim = c(0,100))
points(dat.street$hour, dat.street$harmcount, col="darkred",pch = 16, cex = 1 )`
Try this:
x <- 1:5
y1 <- rnorm(5)
y2 <- rnorm(5)
plot( x, y1 )
y3 <- y1 + y2
plot( x, y3 )
y4 <- sum( y1 + y2 )
plot( x, y4 )
y3
y4
Pay attention to how you are creating harmcount. Should the result be a vector? Or a single value?
Hi there,
So I'm trying to plot on the x axis hours and the y axis number of total injuries + total fatalities. I've been trying out so many things and I keep getting errors. This last one says x and y lengths differ. Shouldn't points be x = hours and y = harmcount?
I rewatched the video from lab 3 on rendering plots and putting points down looked so easy. :/
Here is a piece of code: