[R] help for barchart(lattice)
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Tue Jul 1 16:23:48 CEST 2003
On Tue, 1 Jul 2003, Erwan BARRET wrote:
> I'd like to plot coefficients from glm result. with barchart,
> coefficients are ordered by the names of factors and I'd like to order
> them by values (or abs(values)).
You need to set up a factor for the grouping you want: the plot order is
along the levels of the grouping factor. Take a look at the barchart
example for barley: neither year nor site are in alphabetical order.
> to do that, I've ordered the vector of coefficients but it's plotting the
> same thing.
An implicit call to factor will use alphabetical order, so use an explict
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help