[R] barplot x axis labels

Andrew Perrin clists at perrin.socsci.unc.edu
Tue May 13 19:20:59 CEST 2003


I know this has got to be easy, but can't figure it out.

I've got a data frame that includes several numeric indices and a date for
each of 1100 records.  I'd like to plot a barplot of the mean of each of
these indices by date.  I've managed to do this:

> barplot(tapply(first.pro.auth.sum, dates(date), mean))

but even though I use the dates(date) function, the x axis displays
numeric labels, not dates. I'd like it to display the dates. Any advice?

Thanks.

----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists at perrin.socsci.unc.edu * andrew_perrin (at) unc.edu




More information about the R-help mailing list