[Distr-commits] r381 - branches/distr-2.1/pkg/distr/R branches/distr-2.1/pkg/distr/chm branches/distr-2.1/pkg/distr/man branches/distr-2.1/pkg/utils pkg/distr/R pkg/distr/inst/doc pkg/distr/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 26 12:58:37 CET 2009


Author: ruckdeschel
Date: 2009-01-26 12:58:37 +0100 (Mon, 26 Jan 2009)
New Revision: 381

Modified:
   branches/distr-2.1/pkg/distr/R/DiscreteDistribution.R
   branches/distr-2.1/pkg/distr/chm/00Index.html
   branches/distr-2.1/pkg/distr/chm/0distr-package.html
   branches/distr-2.1/pkg/distr/chm/Distr.chm
   branches/distr-2.1/pkg/distr/chm/Distr.toc
   branches/distr-2.1/pkg/distr/chm/prob-methods.html
   branches/distr-2.1/pkg/distr/man/0distr-package.Rd
   branches/distr-2.1/pkg/distr/man/prob-methods.Rd
   branches/distr-2.1/pkg/utils/ladealles.R
   pkg/distr/R/DiscreteDistribution.R
   pkg/distr/inst/doc/newDistributions.Rnw
   pkg/distr/man/0distr-package.Rd
   pkg/distr/man/prob-methods.Rd
Log:
-new method prob() for DiscreteDistribution-class
-new section "Extension packages" in package-help file 0distr-package.Rd
-mention of CompoundDistribution-class in package-help file 0distr-package.Rd of devel version

Modified: branches/distr-2.1/pkg/distr/R/DiscreteDistribution.R
===================================================================
--- branches/distr-2.1/pkg/distr/R/DiscreteDistribution.R	2009-01-20 19:20:10 UTC (rev 380)
+++ branches/distr-2.1/pkg/distr/R/DiscreteDistribution.R	2009-01-26 11:58:37 UTC (rev 381)
@@ -421,3 +421,19 @@
             function(x) x^0.5)
 
 }          
+setMethod("prob", "DiscreteDistribution", 
+function(object) {sp <- object at support
+                  pr <- object at d(sp)
+                  names(pr) <- paste(sp)
+                  return(pr)
+                  })
+## Replace Methods
+setReplaceMethod("prob", "DiscreteDistribution",  
+                  function(object, value){ 
+                  return(DiscreteDistribution(supp = object at support, 
+                             prob = value,
+                            .withArith = object at .withArith,
+                            .withSim = object at .withSim,
+                            .lowerExact = object at .lowerExact, 
+                            .logExact = object at .logExact))}
+                  )

Modified: branches/distr-2.1/pkg/distr/chm/00Index.html
===================================================================
--- branches/distr-2.1/pkg/distr/chm/00Index.html	2009-01-20 19:20:10 UTC (rev 380)
+++ branches/distr-2.1/pkg/distr/chm/00Index.html	2009-01-26 11:58:37 UTC (rev 381)
@@ -1232,6 +1232,8 @@
 <td>Methods for Function prob in Package &lsquo;distr&rsquo; </td></tr>
 <tr><td width="25%"><a href="prob-methods.html">prob,BinomParameter-method</a></td>
 <td>Methods for Function prob in Package &lsquo;distr&rsquo; </td></tr>
+<tr><td width="25%"><a href="prob-methods.html">prob,DiscreteDistribution-method</a></td>
+<td>Methods for Function prob in Package &lsquo;distr&rsquo; </td></tr>
 <tr><td width="25%"><a href="prob-methods.html">prob,Geom-method</a></td>
 <td>Methods for Function prob in Package &lsquo;distr&rsquo; </td></tr>
 <tr><td width="25%"><a href="prob-methods.html">prob,GeomParameter-method</a></td>
@@ -1246,6 +1248,8 @@
 <td>Methods for Function prob in Package &lsquo;distr&rsquo; </td></tr>
 <tr><td width="25%"><a href="prob-methods.html">prob&lt;-,BinomParameter-method</a></td>
 <td>Methods for Function prob in Package &lsquo;distr&rsquo; </td></tr>
+<tr><td width="25%"><a href="prob-methods.html">prob&lt;-,DiscreteDistribution-method</a></td>
+<td>Methods for Function prob in Package &lsquo;distr&rsquo; </td></tr>
 <tr><td width="25%"><a href="prob-methods.html">prob&lt;-,Geom-method</a></td>
 <td>Methods for Function prob in Package &lsquo;distr&rsquo; </td></tr>
 <tr><td width="25%"><a href="prob-methods.html">prob&lt;-,GeomParameter-method</a></td>

Modified: branches/distr-2.1/pkg/distr/chm/0distr-package.html
===================================================================
--- branches/distr-2.1/pkg/distr/chm/0distr-package.html	2009-01-20 19:20:10 UTC (rev 380)
+++ branches/distr-2.1/pkg/distr/chm/0distr-package.html	2009-01-26 11:58:37 UTC (rev 381)
@@ -274,6 +274,28 @@
 </p>
 
 
+<h3>Extension Packages in distrXXX family</h3>
+
+<p>
+Please note that there are extension packages of this packages
+available on CRAN,
+<dl>
+<dt><span class="pkg">distrDoc</span></dt><dd>a documentation package providing joint documentation
+for all packages of the distrXXX family of packages in the form of vignette
+'distr'; try <code>require(distrDoc); vignette("distr")</code>.</dd>
+<dt><span class="pkg">distrEx</span></dt><dd>provides functionals (like <code>E</code>, <code>sd</code>, <code>mad</code>)
+operating on distributions, as well as distances between distributions and basic 
+support for multivariate and conditional distributions.</dd>
+<dt><span class="pkg">distrSim</span></dt><dd>for the standardized treatment of simulations, 
+also under contaminations.</dd>
+<dt><span class="pkg">distrTEst</span></dt><dd>with classes and methods for evaluations of statistical procedures
+on simulations generated by <span class="pkg">distrSim</span>.</dd>
+<dt><span class="pkg">distrTeach</span></dt><dd>embodies illustrations for basic stats courses using 
+our distribution classes.</dd>
+<dt><span class="pkg">distrMod</span></dt><dd>provides classes for parametric models and hence covers,
+in an object orientated way, estimation in statistical models.</dd>
+</dl>
+
 <h3>Acknowledgement</h3>
 
 <p>

Modified: branches/distr-2.1/pkg/distr/chm/Distr.chm
===================================================================
(Binary files differ)

Modified: branches/distr-2.1/pkg/distr/chm/Distr.toc
===================================================================
--- branches/distr-2.1/pkg/distr/chm/Distr.toc	2009-01-20 19:20:10 UTC (rev 380)
+++ branches/distr-2.1/pkg/distr/chm/Distr.toc	2009-01-26 11:58:37 UTC (rev 381)
@@ -2554,6 +2554,10 @@
 <param name="Local" value="prob-methods.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="prob,DiscreteDistribution-method">
+<param name="Local" value="prob-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="prob,Geom-method">
 <param name="Local" value="prob-methods.html">
 </OBJECT>
@@ -2586,6 +2590,10 @@
 <param name="Local" value="prob-methods.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="prob<-,DiscreteDistribution-method">
+<param name="Local" value="prob-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="prob<-,Geom-method">
 <param name="Local" value="prob-methods.html">
 </OBJECT>

Modified: branches/distr-2.1/pkg/distr/chm/prob-methods.html
===================================================================
--- branches/distr-2.1/pkg/distr/chm/prob-methods.html	2009-01-20 19:20:10 UTC (rev 380)
+++ branches/distr-2.1/pkg/distr/chm/prob-methods.html	2009-01-26 11:58:37 UTC (rev 381)
@@ -21,6 +21,8 @@
 <param name="keyword" value="R:   prob<-,Nbinom-method">
 <param name="keyword" value="R:   prob<-,GeomParameter-method">
 <param name="keyword" value="R:   prob<-,Geom-method">
+<param name="keyword" value="R:   prob,DiscreteDistribution-method">
+<param name="keyword" value="R:   prob<-,DiscreteDistribution-method">
 <param name="keyword" value=" Methods for Function prob in Package &lsquo;distr&rsquo;">
 </object>
 
@@ -62,9 +64,18 @@
 
 <dt>prob</dt><dd><code>signature(object = "Geom")</code>: returns the slot <code>prop</code> of the parameter of the distribution </dd>
 <dt>prob&lt;-</dt><dd><code>signature(object = "Geom")</code>: modifies the slot <code>prob</code> of the parameter of the distribution </dd>
+
+
+<dt>prob</dt><dd><code>signature(object = "DiscreteDistribution")</code>: returns the 
+(named) vector of probabilities for the support points of the distribution. </dd>
+<dt>prob&lt;-</dt><dd><code>signature(object = "DiscreteDistribution")</code>: 
+generates a new object of class <code>"DiscreteDistribution"</code> with
+the same support as <code>object</code> as well as the same 
+<code>.withSim</code>, <code>.withArith</code>, <code>.lowerExact</code>, 
+<code>.logExact</code> slots. </dd>
 </dl>
 
 
-<hr><div align="center">[Package <em>distr</em> version 2.1 <a href="00Index.html">Index]</a></div>
+<hr><div align="center">[Package <em>distr</em> version 2.1 <a href="00Index.html">Index</a>]</div>
 
 </body></html>

Modified: branches/distr-2.1/pkg/distr/man/0distr-package.Rd
===================================================================
--- branches/distr-2.1/pkg/distr/man/0distr-package.Rd	2009-01-20 19:20:10 UTC (rev 380)
+++ branches/distr-2.1/pkg/distr/man/0distr-package.Rd	2009-01-26 11:58:37 UTC (rev 381)
@@ -119,6 +119,7 @@
 |>|>"UnivarMixingDistribution"
 |>|>|>"UnivarLebDecDistribution"
 |>|>|>|>"AffLinUnivarLebDecDistribution"
+|>|>|>"CompoundDistribution"
 |>|>"AbscontDistribution"
 |>|>|>"AffLinAbscontDistribution"
 |>|>|>"Arcsine"
@@ -240,6 +241,28 @@
 be inspected / set by \code{distroptions()} and \code{getdistrOption()}, 
 confer \link{distroptions} .
 }
+
+\section{Extension Packages in distrXXX family}{
+Please note that there are extension packages of this packages
+available on CRAN,
+\describe{
+\item{\pkg{distrDoc}}{a documentation package providing joint documentation
+for all packages of the distrXXX family of packages in the form of vignette
+'distr'; try \code{require(distrDoc); vignette("distr")}.}
+\item{\pkg{distrEx}}{provides functionals (like \code{E}, \code{sd}, \code{mad})
+operating on distributions, as well as distances between distributions and basic 
+support for multivariate and conditional distributions.}
+\item{\pkg{distrSim}}{for the standardized treatment of simulations, 
+also under contaminations.}
+\item{\pkg{distrTEst}}{with classes and methods for evaluations of statistical procedures
+on simulations generated by \pkg{distrSim}.}
+\item{\pkg{distrTeach}}{embodies illustrations for basic stats courses using 
+our distribution classes.}
+\item{\pkg{distrMod}}{provides classes for parametric models and hence covers,
+in an object orientated way, estimation in statistical models.}
+}
+}
+
 \section{Acknowledgement}{
 We thank Martin Maechler, Josef Leydold, John Chambers,
 Duncan Murdoch, Gregory Warnes, Paul Gilbert, Kurt Hornik,

Modified: branches/distr-2.1/pkg/distr/man/prob-methods.Rd
===================================================================
--- branches/distr-2.1/pkg/distr/man/prob-methods.Rd	2009-01-20 19:20:10 UTC (rev 380)
+++ branches/distr-2.1/pkg/distr/man/prob-methods.Rd	2009-01-26 11:58:37 UTC (rev 381)
@@ -16,6 +16,8 @@
 \alias{prob<-,Nbinom-method}
 \alias{prob<-,GeomParameter-method}
 \alias{prob<-,Geom-method}
+\alias{prob,DiscreteDistribution-method}
+\alias{prob<-,DiscreteDistribution-method}
 \title{ Methods for Function prob in Package `distr' }
 \description{prob-methods}
 
@@ -38,6 +40,14 @@
 
 \item{prob}{\code{signature(object = "Geom")}: returns the slot \code{prop} of the parameter of the distribution }
 \item{prob<-}{\code{signature(object = "Geom")}: modifies the slot \code{prob} of the parameter of the distribution }
+
+\item{prob}{\code{signature(object = "DiscreteDistribution")}: returns the 
+(named) vector of probabilities for the support points of the distribution. }
+\item{prob<-}{\code{signature(object = "DiscreteDistribution")}: 
+               generates a new object of class \code{"DiscreteDistribution"} with
+               the same support as \code{object} as well as the same 
+               \code{.withSim}, \code{.withArith}, \code{.lowerExact}, 
+               \code{.logExact} slots. }
 }}
 \keyword{distribution}
 \concept{parameter}

Modified: branches/distr-2.1/pkg/utils/ladealles.R
===================================================================
--- branches/distr-2.1/pkg/utils/ladealles.R	2009-01-20 19:20:10 UTC (rev 380)
+++ branches/distr-2.1/pkg/utils/ladealles.R	2009-01-26 11:58:37 UTC (rev 381)
@@ -6,5 +6,5 @@
  setwd(od)
 }
 
-ladeall(DIR="distrMod", develDir = "C:/rtest/distr/branches/distr-2.0/pkg")
+ladeall(DIR="distr", develDir = "C:/rtest/distr/branches/distr-2.1/pkg")
 

Modified: pkg/distr/R/DiscreteDistribution.R
===================================================================
--- pkg/distr/R/DiscreteDistribution.R	2009-01-20 19:20:10 UTC (rev 380)
+++ pkg/distr/R/DiscreteDistribution.R	2009-01-26 11:58:37 UTC (rev 381)
@@ -420,3 +420,17 @@
 
 }          
 
+setMethod("prob", "DiscreteDistribution", 
+function(object) {sp <- object at support
+                  pr <- object at d(sp)
+                  names(pr) <- paste(sp)
+                  return(pr)
+                  })
+## Replace Methods
+setReplaceMethod("prob", "DiscreteDistribution", 
+                  function(object, value){ 
+                  sp <- object at support
+                  .withArith <- object at .withArith
+                  .withSim <- object at .withSim
+                  DiscreteDistribution(supp=sp, prob=value,
+                            .withArith=.withArith,.withSim=.withSim)})

Modified: pkg/distr/inst/doc/newDistributions.Rnw
===================================================================
--- pkg/distr/inst/doc/newDistributions.Rnw	2009-01-20 19:20:10 UTC (rev 380)
+++ pkg/distr/inst/doc/newDistributions.Rnw	2009-01-26 11:58:37 UTC (rev 381)
@@ -12,6 +12,11 @@
 %
 \documentclass[10pt]{article}
 \usepackage{geometry}
+\RequirePackage{ifthen}
+\newboolean{Sweave at gin}
+\setboolean{Sweave at gin}{true}
+\newboolean{Sweave at ae}
+\setboolean{Sweave at ae}{true}
 %
 \usepackage{color}
 \definecolor{darkblue}{rgb}{0.0,0.0,0.75}
@@ -96,6 +101,7 @@
 options(width=70)
 @
 %
+
 <<exam1, eval = TRUE, fig = TRUE>>=
 require(distr)
 N <- Norm(mean = 2, sd = 1.3)

Modified: pkg/distr/man/0distr-package.Rd
===================================================================
--- pkg/distr/man/0distr-package.Rd	2009-01-20 19:20:10 UTC (rev 380)
+++ pkg/distr/man/0distr-package.Rd	2009-01-26 11:58:37 UTC (rev 381)
@@ -239,6 +239,27 @@
 be inspected / set by \code{distroptions()} and \code{getdistrOption()}, 
 confer \link{distroptions} .
 }
+\section{Extension Packages in distrXXX family}{
+Please note that there are extension packages of this packages
+available on CRAN,
+\describe{
+\item{\pkg{distrDoc}}{a documentation package providing joint documentation
+for all packages of the distrXXX family of packages in the form of vignette
+'distr'; try \code{require(distrDoc); vignette("distr")}.}
+\item{\pkg{distrEx}}{provides functionals (like \code{E}, \code{sd}, \code{mad})
+operating on distributions, as well as distances between distributions and basic 
+support for multivariate and conditional distributions.}
+\item{\pkg{distrSim}}{for the standardized treatment of simulations, 
+also under contaminations.}
+\item{\pkg{distrTEst}}{with classes and methods for evaluations of statistical procedures
+on simulations generated by \pkg{distrSim}.}
+\item{\pkg{distrTeach}}{embodies illustrations for basic stats courses using 
+our distribution classes.}
+\item{\pkg{distrMod}}{provides classes for parametric models and hence covers,
+in an object orientated way, estimation in statistical models.}
+}
+}
+
 \section{Acknowledgement}{
 We thank Martin Maechler, Josef Leydold, John Chambers,
 Duncan Murdoch, Gregory Warnes, Paul Gilbert, Kurt Hornik,

Modified: pkg/distr/man/prob-methods.Rd
===================================================================
--- pkg/distr/man/prob-methods.Rd	2009-01-20 19:20:10 UTC (rev 380)
+++ pkg/distr/man/prob-methods.Rd	2009-01-26 11:58:37 UTC (rev 381)
@@ -16,31 +16,42 @@
 \alias{prob<-,Nbinom-method}
 \alias{prob<-,GeomParameter-method}
 \alias{prob<-,Geom-method}
+\alias{prob,DiscreteDistribution-method}
+\alias{prob<-,DiscreteDistribution-method}
 \title{ Methods for Function prob in Package `distr' }
 \description{prob-methods}
 
 \section{Methods}{\describe{
 
-\item{prob}{\code{signature(object = "BinomParameter")}: returns the slot \code{prop} of the parameter of the distribution }
-\item{prob<-}{\code{signature(object = "BinomParameter")}: modifies the slot \code{prob} of the parameter of the distribution }
+\item{prob}{\code{signature(object = "BinomParameter")}: returns the slot \code{prop} of the parameter of the distribution. }
+\item{prob<-}{\code{signature(object = "BinomParameter")}: modifies the slot \code{prob} of the parameter of the distribution. }
 
-\item{prob}{\code{signature(object = "Binom")}: returns the slot \code{prop} of the parameter of the distribution }
-\item{prob<-}{\code{signature(object = "Binom")}: modifies the slot \code{prob} of the parameter of the distribution }
+\item{prob}{\code{signature(object = "Binom")}: returns the slot \code{prop} of the parameter of the distribution. }
+\item{prob<-}{\code{signature(object = "Binom")}: modifies the slot \code{prob} of the parameter of the distribution. }
 
-\item{prob}{\code{signature(object = "NbinomParameter")}: returns the slot \code{prop} of the parameter of the distribution }
-\item{prob<-}{\code{signature(object = "NbinomParameter")}: modifies the slot \code{prob} of the parameter of the distribution }
+\item{prob}{\code{signature(object = "NbinomParameter")}: returns the slot \code{prop} of the parameter of the distribution. }
+\item{prob<-}{\code{signature(object = "NbinomParameter")}: modifies the slot \code{prob} of the parameter of the distribution. }
 
-\item{prob}{\code{signature(object = "Nbinom")}: returns the slot \code{prop} of the parameter of the distribution }
-\item{prob<-}{\code{signature(object = "Nbinom")}: modifies the slot \code{prob} of the parameter of the distribution }
+\item{prob}{\code{signature(object = "Nbinom")}: returns the slot \code{prop} of the parameter of the distribution. }
+\item{prob<-}{\code{signature(object = "Nbinom")}: modifies the slot \code{prob} of the parameter of the distribution. }
 
-\item{prob}{\code{signature(object = "GeomParameter")}: returns the slot \code{prop} of the parameter of the distribution (deprecated from 1.9 on)}
-\item{prob<-}{\code{signature(object = "GeomParameter")}: modifies the slot \code{prob} of the parameter of the distribution (deprecated from 1.9 on)}
+\item{prob}{\code{signature(object = "GeomParameter")}: returns the slot \code{prop} of the parameter of the distribution (deprecated from 1.9 on).}
+\item{prob<-}{\code{signature(object = "GeomParameter")}: modifies the slot \code{prob} of the parameter of the distribution (deprecated from 1.9 on).}
 
-\item{prob}{\code{signature(object = "Geom")}: returns the slot \code{prop} of the parameter of the distribution }
-\item{prob<-}{\code{signature(object = "Geom")}: modifies the slot \code{prob} of the parameter of the distribution }
+\item{prob}{\code{signature(object = "Geom")}: returns the slot \code{prop} of the parameter of the distribution. }
+\item{prob<-}{\code{signature(object = "Geom")}: modifies the slot \code{prob} of the parameter of the distribution. }
+
+\item{prob}{\code{signature(object = "DiscreteDistribution")}: returns the 
+(named) vector of probabilities for the support points of the distribution. }
+\item{prob<-}{\code{signature(object = "DiscreteDistribution")}: 
+               generates a new object of class \code{"DiscreteDistribution"} with
+               the same support as \code{object} as well as the same 
+               \code{.withSim}, \code{.withArith} slots. }
+
 }}
 \keyword{distribution}
 \concept{parameter}
+\concept{discrete distribution}
 \concept{Binomial distribution}
 \concept{Negative Binomial distribution}
 \concept{Geometric distribution}



More information about the Distr-commits mailing list