[Analogue-commits] r150 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Oct 14 22:43:47 CEST 2009
Author: gsimpson
Date: 2009-10-14 22:43:47 +0200 (Wed, 14 Oct 2009)
New Revision: 150
Modified:
pkg/R/Stratiplot.R
Log:
Stratiplot not respecting sort variable in some situations
Modified: pkg/R/Stratiplot.R
===================================================================
--- pkg/R/Stratiplot.R 2009-08-16 17:42:23 UTC (rev 149)
+++ pkg/R/Stratiplot.R 2009-10-14 20:43:47 UTC (rev 150)
@@ -31,10 +31,12 @@
## sort by
opt <- optima(x, svar)
ord <- order(opt)
- } else if(check.var) {
- warning("With 'sort = \"var\"', 'svar' not supplied.\nNo sorting applied.")
- } else {
- ord <- order(svar)
+ } else if(sort == "var") {
+ if(check.var) {
+ warning("With 'sort = \"var\"', 'svar' not supplied.\nNo sorting applied.")
+ } else {
+ ord <- order(svar)
+ }
}
if(rev.sort)
ord <- rev(ord)
More information about the Analogue-commits
mailing list