[Distr-commits] r161 - in branches/distr-2.0/pkg/distr: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri May 30 11:08:55 CEST 2008
Author: stamats
Date: 2008-05-30 11:08:55 +0200 (Fri, 30 May 2008)
New Revision: 161
Modified:
branches/distr-2.0/pkg/distr/NAMESPACE
branches/distr-2.0/pkg/distr/R/plot-methods.R
branches/distr-2.0/pkg/distr/R/plot-methods_LebDec.R
branches/distr-2.0/pkg/distr/man/internals.Rd
Log:
introduced new function devNew for opening a new device which preserves back compatibility with R versions < 2.8.0
distr now checks and installs without any warning or error under 2.7.0 Patched (2008-05-29 r45814) and 2.8.0 Under development (unstable) (2008-05-29 r45814).
Modified: branches/distr-2.0/pkg/distr/NAMESPACE
===================================================================
--- branches/distr-2.0/pkg/distr/NAMESPACE 2008-05-21 12:15:53 UTC (rev 160)
+++ branches/distr-2.0/pkg/distr/NAMESPACE 2008-05-30 09:08:55 UTC (rev 161)
@@ -13,7 +13,7 @@
"Lattice", "DiscreteDistribution",
"LatticeDistribution", "EuclideanSpace", "Reals",
"Naturals", "standardMethods",
- "distrARITH", "distrMASK", "getLabel")
+ "distrARITH", "distrMASK", "getLabel", "devNew")
export("AbscontDistribution")
export("DistrList", "UnivarDistrList")
exportClasses("rSpace", "EuclideanSpace", "Reals",
Modified: branches/distr-2.0/pkg/distr/R/plot-methods.R
===================================================================
--- branches/distr-2.0/pkg/distr/R/plot-methods.R 2008-05-21 12:15:53 UTC (rev 160)
+++ branches/distr-2.0/pkg/distr/R/plot-methods.R 2008-05-30 09:08:55 UTC (rev 161)
@@ -48,7 +48,7 @@
col.sub <- dots$col
if (!withSweave)
- get(getOption("device"))(width = width, height = height)
+ devNew(width = width, height = height)
omar <- par("mar")
mainL <- FALSE
@@ -306,7 +306,7 @@
col.sub <- dots$col
if (!withSweave)
- get(getOption("device"))(width = width, height = height)
+ devNew(width = width, height = height)
omar <- par("mar")
mainL <- FALSE
@@ -524,9 +524,9 @@
# -------- DistributionList ---------- #
setMethod("plot", "DistrList",
- function(x,y=NULL,...){
+ function(x, y = NULL, ...){
for(i in 1:length(x)){
- get(getOption("device"))()
+ devNew()
plot(x[[i]],...)
}
})
Modified: branches/distr-2.0/pkg/distr/R/plot-methods_LebDec.R
===================================================================
--- branches/distr-2.0/pkg/distr/R/plot-methods_LebDec.R 2008-05-21 12:15:53 UTC (rev 160)
+++ branches/distr-2.0/pkg/distr/R/plot-methods_LebDec.R 2008-05-30 09:08:55 UTC (rev 161)
@@ -92,7 +92,7 @@
col.sub <- dots$col
if (!withSweave)
- get(getOption("device"))(width = width, height = height)
+ devNew(width = width, height = height)
omar <- par("mar")
mainL <- FALSE
Modified: branches/distr-2.0/pkg/distr/man/internals.Rd
===================================================================
--- branches/distr-2.0/pkg/distr/man/internals.Rd 2008-05-21 12:15:53 UTC (rev 160)
+++ branches/distr-2.0/pkg/distr/man/internals.Rd 2008-05-30 09:08:55 UTC (rev 161)
@@ -46,6 +46,7 @@
\alias{.Q2P}
\alias{.csimpsum}
\alias{.primefun}
+\alias{devNew}
\title{Internal functions of package distr}
@@ -76,7 +77,7 @@
.multm(e1, e2, Dclass = "DiscreteDistribution")
.notwithLArg(D)
.getObjName(i = 1)
-.discretizeP(D, lower, upper, h)
+.discretizeP(D, lower, upper, h)
.fm(x,f)
.fM(x,f)
.fM2(x,f)
@@ -106,6 +107,7 @@
.Q2P (q, ngrid = getdistrOption("DefaultNrGridPoints"))
.csimpsum(fx)
.primefun(f,x, nm = NULL)
+devNew(...)
}
@@ -193,6 +195,7 @@
\item{fx}{a vector of function evaluations multiplied by the gridwidth}
\item{f}{a vector of function evaluations}
\item{nm}{an optional right asymptotic value}
+ \item{...}{arguments passed through to other functions}
}
\details{
@@ -296,7 +299,7 @@
\code{.D2P} and \code{.Q2P} reconstruct function slot \code{p} from
from function slots \code{d} resp. \code{q}
by means of function \code{.makePNew} and explicite numeric inversion,
-respectively.
+respectively.
\code{.csimpsum} is used internally in \code{.makePNew} to produce
a prime function out of function evaluations by means of vectorized
@@ -305,6 +308,8 @@
of \code{cumsum}. \code{.primefun} is similar but more flexible and
produces the prime function as a function.
+\code{devNew} opens a new device. This function is for back compatibility
+with R versions < 2.8.0.
}
@@ -356,11 +361,13 @@
lower.tail = TRUE, log.p = FALSE)}}
\code{.csimpsum}{a vector of evaluations of the prime function at the grid points}
\code{.primefun}{the prime function as a function}
+\code{devNew}{returns the return value of the device opened, usually invisible 'NULL'}
}
\author{
Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de}
- }
+ Matthias Kohl \email{Matthias.Kohl at stamats.de}
+}
\seealso{
\code{\link{AbscontDistribution}},
@@ -371,7 +378,7 @@
\code{\link{convpow}},
\code{\link{operators}},
\code{\link{plot-methods}}
+\code{\link[grDevices]{dev.new}}
}
-
\keyword{internal}
\concept{utilities}
More information about the Distr-commits
mailing list