Dear R users,

I am having problems making a boxplot across time. I wish to plot the
"Values" (y-axis) against "Date" (x-axis) but would like the Date to be
sequential from 2007-11-15 until 2008-01-31 (therefore there will be lots of
NA's e.g. from 2007-11-16 to 2007-11-26 nothing will show in the plot).
Please see sample table below. Also would like to show in the x-axis only
the labels for the first day of the month.

I tried the following but it didn't work as I hoped as the x-axis is not in
a sequence, is only the Dates in the table:

- boxplot(Values~as.Date(Dates,format="%d/%m/%Y"),
at=unique(as.Date(Dates,format="%d/%m/%Y")))


mytable
 Date            Values
 2007-11-15  4.882687861
 2007-11-15  3.987085185
 2007-11-27  4.012696575
 2007-11-28  5.294707110
 2007-11-28  4.033201550
 2007-11-28  5.364524511
 2007-11-28  5.002159389
 2007-11-29  4.221255553
 2008-01-11  4.154506592
 2008-01-11  4.587936354
 2008-01-16  4.188505351
 2008-01-16  4.491573677
 2008-01-28  5.054001005
 2008-01-28  4.204093421
 2008-01-29  4.597323620
 2008-01-29  5.082882698

If someone could help me I would be very thankfull.

Best regards
Mafalda

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to