I'm trying to create a stacked bar chart from data held in a data frame that has two columns. An example of the data format is below:
Date Speed
01/01/2013 56
01/01/2013 45
01/01/2013 34
02/01/2013 23
02/01/2013 12
02/01/2013 1
03/01/2013 48
For each day I need to count the number of entries that fall into each category (defined by limits e.g., 0-40, 41-48, 49-60, > 60) and then plot the counts for each day as a stacked bar chart.
I can do this by counting the number of entries for each day separately, and putting the results into a new data frame of the right format to plot using the standard stacked bar chart command. But this is an inefficient approach. I haven't been able to find a more elegant method in my searches but I believe one must exist.
I would like to use only the standard packages to do this as I cannot install new packages on the system I have available to me.