[Analogue-commits] r184 - in pkg: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jul 3 00:19:32 CEST 2010
Author: gsimpson
Date: 2010-07-03 00:19:32 +0200 (Sat, 03 Jul 2010)
New Revision: 184
Modified:
pkg/R/Stratiplot.R
pkg/R/Stratiplot.formula.R
pkg/inst/ChangeLog
Log:
more fixes to names-preservation in Stratiplot formula
Modified: pkg/R/Stratiplot.R
===================================================================
--- pkg/R/Stratiplot.R 2010-07-02 16:36:12 UTC (rev 183)
+++ pkg/R/Stratiplot.R 2010-07-02 22:19:32 UTC (rev 184)
@@ -13,6 +13,7 @@
svar = NULL,
rev.sort = FALSE,
strip = FALSE,
+ topPad = 6,
...) {
## inline function for custom axis
axis.VarLabs <- function(side, ...) {
@@ -102,7 +103,7 @@
valueOnly = TRUE)
}
str.max <- max(sapply(levels(sx$ind), convWidth, gp))
- str.max <- ceiling(str.max) + 6
+ str.max <- ceiling(str.max) + topPad
}
## plotting
xyplot(y ~ values | ind,
Modified: pkg/R/Stratiplot.formula.R
===================================================================
--- pkg/R/Stratiplot.formula.R 2010-07-02 16:36:12 UTC (rev 183)
+++ pkg/R/Stratiplot.formula.R 2010-07-02 22:19:32 UTC (rev 184)
@@ -12,6 +12,7 @@
mt <- attr(mf, "terms")
y <- model.response(mf, "numeric")
data <- data.frame(model.matrix(mt, mf), check.names = FALSE)[,-1]
+ names(data) <- gsub("`", "", names(data))
n.vars <- ncol(data)
y <- rep(y, n.vars)
if(is.null(ylab))
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2010-07-02 16:36:12 UTC (rev 183)
+++ pkg/inst/ChangeLog 2010-07-02 22:19:32 UTC (rev 184)
@@ -6,7 +6,8 @@
data of Birks and Mathewes (1978).
* Stratiplot: Preserves the names component as far as is
- possible.
+ possible, even to the extent of processing the names after the
+ manipulations arising from the formula interface.
Bug in padding of the y-axis now fixed; default is to add 1% of
the range y-axis to the y-axis limits specified.
More information about the Analogue-commits
mailing list