Looking at dynamic data with time-series

Now we are going to focus on another very common type of graph: time-series. Our objective is to understand how our data is behaving for the last n days, and, as we have done before, we want to further disaggregate using colors, like the graph below shows:

If you have read all the chapter up until this point, you should be able to understand most of what the function is doing. The only new function is scale_x_date(). It allows us to specify date formats for the axis ticks other than the default. In this case, we want to use breaks by day (as we had done in some examples before), but we want the format ...

Get R Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.