DavidFirth / qvcalc

R package for quasi-variances
https://davidfirth.github.io/qvcalc/
0 stars 2 forks source link

Ability to sort items on x-axis by estimate value #4

Closed Derek-Jones closed 5 years ago

Derek-Jones commented 6 years ago

In the call:

plot(qvcalc(BTabilities(prec_mod)))

the order of items on the x-axis is whatever is returned by a call to BTm (in this case).

The output plot would be more informative if the items appeared sorted by estimate value.

Trying various ideas (using calls to ordered to change the ordering of items returned by BTabilities) only resulted in various error messages being generated.

DavidFirth commented 5 years ago

Thanks for this -- a good suggestion. In qvcalc version 1.0.0 that will shortly appear on CRAN, I have added an example to ?plot.qv to show how to do this, i.e., to re-order the rows of the data frame that lives inside every object of class "qv".