[Robast-commits] r451 - in branches/robast-0.9/pkg/RobAStBase: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 14 14:38:21 CET 2011
Author: ruckdeschel
Date: 2011-03-14 14:38:19 +0100 (Mon, 14 Mar 2011)
New Revision: 451
Modified:
branches/robast-0.9/pkg/RobAStBase/R/infoPlot.R
branches/robast-0.9/pkg/RobAStBase/man/infoPlot.Rd
Log:
[RobAStBase] Bug in infoPlot(), detected by Nataliya Horbenko, tentatively fixed
Modified: branches/robast-0.9/pkg/RobAStBase/R/infoPlot.R
===================================================================
--- branches/robast-0.9/pkg/RobAStBase/R/infoPlot.R 2011-01-06 10:41:06 UTC (rev 450)
+++ branches/robast-0.9/pkg/RobAStBase/R/infoPlot.R 2011-03-14 13:38:19 UTC (rev 451)
@@ -1,3 +1,4 @@
+DEBUG.INFO <- FALSE
setMethod("infoPlot", "IC",
function(object, data = NULL,
..., withSweave = getdistrOption("withSweave"),
@@ -20,7 +21,8 @@
dots <- match.call(call = sys.call(sys.parent(1)),
expand.dots = FALSE)$"..."
-
+ if(DEBUG.INFO) print("DATA")
+ if(DEBUG.INFO) print(str(data))
L2Fam <- eval(object at CallL2Fam)
@@ -273,9 +275,17 @@
absInfoClass.data <- absInfoEval(data,absInfoClass.f)
absInfo.data <- absInfoEval(data,absInfo.f)
+
+ if(DEBUG.INFO) print("DATA1")
+ if(DEBUG.INFO) print(absInfo.data)
+ if(DEBUG.INFO) print(absInfoClass.data)
absInfo0.data <- absInfo.data[which.lbs]
absInfo0Class.data <- absInfoClass.data[which.lbs]
+
+ if(DEBUG.INFO) print("DATA2")
+ if(DEBUG.INFO) print(absInfo0.data)
+ if(DEBUG.INFO) print(absInfo0Class.data)
aIC.data.m <- max(absInfo0Class.data)
aI.data.m <- max(absInfo0.data)
@@ -291,14 +301,19 @@
data0 <- data0[oN0]
data0C <- data0[oN0Class]
- if(!is.null(which.Order)){
- oN <- oN0[(n+1)-which.Order]
- oNC <- oN0Class[(n+1)-which.Order]
- data0 <- data[oN]
- data0C <- data[oNC]
- absInfo0.data <- absInfo.data[oN]
- absInfo0Class.data <- absInfoClass.data[oNC]
- }
+ if(is.null(which.Order))
+ which.Order <- 1:n
+ oN <- oN0[(n+1)-which.Order]
+ oNC <- oN0Class[(n+1)-which.Order]
+ data0 <- data[oN]
+ data0C <- data[oNC]
+ absInfo0.data <- absInfo.data[oN]
+ absInfo0Class.data <- absInfoClass.data[oNC]
+ if(DEBUG.INFO) print("DATA3")
+ if(DEBUG.INFO) print(absInfo0.data)
+ if(DEBUG.INFO) print(absInfo0Class.data)
+
+
n <- length(oN)
}
lab.pts <- if(is.null(lab.pts))
@@ -324,6 +339,12 @@
text(x = y0c, y = ICy0c, labels = lab.pts0[,2],
cex = log(ICy0+1)*1.5*cex0[2], col = col0[2])
}
+ if(DEBUG.INFO) print("DATA4")
+ if(DEBUG.INFO) print(ICy0)
+ if(DEBUG.INFO) print(ICy0c)
+ if(DEBUG.INFO) print(y0)
+ if(DEBUG.INFO) print(y0c)
+
pL0
}, list(ICy0 = absInfo0.data, ICy0c = absInfo0Class.data,
pL0 = pL, y0 = data0, y0c = data0C,
@@ -351,6 +372,11 @@
text(x = y0, y = y0c.vec, labels = lab.pts0[,2],
cex = log(ICy0c+1)*1.5*cex0[2], col = col0[2])
}
+ if(DEBUG.INFO) print("DATA5")
+ if(DEBUG.INFO) print(ICy0)
+ if(DEBUG.INFO) print(ICy0c)
+ if(DEBUG.INFO) print(y0)
+ if(DEBUG.INFO) print(y0c)
pL0
}, list(ICy0c = absInfo0Class.data, ICy0 = absInfo0.data,
pL0 = pL, y0 = data0, y0c = data0C,
@@ -391,6 +417,7 @@
}
if(dims > 1 && length(to.draw[to.draw!=1])>0){
+ dotsP["log"] <- NULL
dotsP["ylim"] <- NULL
dotsL["ylim"] <- NULL
dotsT["ylim"] <- NULL
Modified: branches/robast-0.9/pkg/RobAStBase/man/infoPlot.Rd
===================================================================
--- branches/robast-0.9/pkg/RobAStBase/man/infoPlot.Rd 2011-01-06 10:41:06 UTC (rev 450)
+++ branches/robast-0.9/pkg/RobAStBase/man/infoPlot.Rd 2011-03-14 13:38:19 UTC (rev 451)
@@ -158,6 +158,7 @@
## selection of subpanels for plotting
par(mfrow=c(1,2))
infoPlot(IC1, mfColRow = FALSE, to.draw.arg=c("Abs","sd"))
+infoPlot(IC1, mfColRow = FALSE, to.draw.arg=c("Abs","sd"), log="y")
infoPlot(IC1, mfColRow = FALSE, to.draw.arg=c("Abs","mean"),
panel.first= grid(), ylim = c(0,4), xlim = c(-6,6))
infoPlot(IC1, mfColRow = FALSE, to.draw.arg=c("Abs","mean"),
More information about the Robast-commits
mailing list