[R] plotting evolution of dates

stef salvez loggyedy at googlemail.com
Sun Jun 3 15:27:30 CEST 2012


Dear R users,

I have the following problem

I have a panel data across countries and individuals. For each country
I have a sequence of dates
For France for example
22/02/09
22/03/09
19/04/09
17/05/09
12/07/09
09/08/09
06/09/09
04/10/09
01/11/09
29/11/09
27/12/09
31/01/10

For Italy
14/06/09
12/07/09
09/08/09
06/09/09
04/10/09
01/11/09
29/11/09
27/12/09
31/01/10
28/02/10
28/03/10


The structure of the MS  excel file is the following
France              Italy                        ......
22/02/09               14/06/09
 22/03/09             12/7/2009
19/04/09              9/8/2009
17/05/09                6/9/2009
12/7/2009             4/10/2009
 09/08/09             01/11/09
6/9/2009                29/11/09
4/10/2009             27/12/09
 01/11/09             31/01/10
29/11/09              28/02/10
27/12/09              28/03/10
31/01/10



I want to "plot" (in one graph) these sequences of dates in the
sense that I want to have a "visual" contact of  the behaviour
of each of  these 2 sequences because as you can see I do not have the same
start date and   end date for each country and each next date is not
always every other 28 days. So the difference between  2 successive
dates is not always 28 days but 35 is some cases or otherwise.  Put
differently, I have "jumps".
 I would like to visualize these
characteristics of the  series of  dates by
making a plot similar to

http://i46.tinypic.com/2h7gpvn.png

But this is not enough.
I want to measure the distance between 2 successive knots (the
difference between 2 successive dates) and note  on the plot the
number of weeks that separate apart the successive knots-dates
Something like

http://www.survey-design.com.au/stripplot3.png

where as you can see between the knots there are some red lines. In my
case these red lines would inform the reader about the number of weeks
between successive knots-dates




I need a specific code for this because a simple hint will not help me
as I am a new R user.

Thank you all



More information about the R-help mailing list