[R] How to plot several years data with date information by months?

ZhaoXing zhaoxing731 at gmail.com
Sat Apr 6 10:00:32 CEST 2013


Hi, all

I have a medium sized data, 6 years. Each observation is a case with a date variable, such as '2004-08-02'.
Some of the months didn't occur a case.
I want to plot the 6 years data by month, and the Y_axis is the freqency of cases for each month, meaning 12*6=72 bars or points in the figure.
I though of a method, 1st, using the months function, then ploting. But I need to assign zero to the months without case. And a lot of other manipulations.
Is there any simpler way to complete this? or just a simple function exists?

Thanks in advance

ZhaoXing


More information about the R-help mailing list