[Distr-commits] r961 - in branches/distr-2.6/pkg/distrEx: . R man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 14 18:20:36 CEST 2014


Author: stamats
Date: 2014-08-14 18:20:36 +0200 (Thu, 14 Aug 2014)
New Revision: 961

Added:
   branches/distr-2.6/pkg/distrEx/R/EmpiricalMVDistribution.R
   branches/distr-2.6/pkg/distrEx/man/EmpiricalMVDistribution.Rd
Modified:
   branches/distr-2.6/pkg/distrEx/DESCRIPTION
   branches/distr-2.6/pkg/distrEx/NAMESPACE
   branches/distr-2.6/pkg/distrEx/man/0distrEx-package.Rd
   branches/distr-2.6/pkg/distrEx/man/DiscreteMVDistribution.Rd
   branches/distr-2.6/pkg/distrEx/src/GLaw.c
Log:
Added generating function EmpiricalMVDistribution as a simple wrapper to DiscreteMVDistribution. 
In addition, removed definition of PI as it is already defined in the included R.h. 
Futhermore, distrEx now depends on R >= 2.10.0.

Modified: branches/distr-2.6/pkg/distrEx/DESCRIPTION
===================================================================
--- branches/distr-2.6/pkg/distrEx/DESCRIPTION	2014-08-14 16:05:27 UTC (rev 960)
+++ branches/distr-2.6/pkg/distrEx/DESCRIPTION	2014-08-14 16:20:36 UTC (rev 961)
@@ -3,7 +3,7 @@
 Date: 2013-09-18
 Title: Extensions of package distr
 Description: Extensions of package distr and some additional functionality
-Depends: R(>= 2.6.0), methods, distr(>= 2.2)
+Depends: R(>= 2.10.0), methods, distr(>= 2.2)
 Suggests: tcltk
 Author: Matthias Kohl, Peter Ruckdeschel, Nataliya Horbenko
 Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>

Modified: branches/distr-2.6/pkg/distrEx/NAMESPACE
===================================================================
--- branches/distr-2.6/pkg/distrEx/NAMESPACE	2014-08-14 16:05:27 UTC (rev 960)
+++ branches/distr-2.6/pkg/distrEx/NAMESPACE	2014-08-14 16:20:36 UTC (rev 961)
@@ -1,50 +1,51 @@
-useDynLib("distrEx")
-
-import("methods")
-import("distr")
-
-exportClasses("Condition", "EuclCondition") 
-exportClasses("LMParameter")
-exportClasses("MultivariateDistribution", 
-              "DiscreteMVDistribution",
-              "UnivariateCondDistribution",
-              "DiscreteCondDistribution", 
-              "AbscontCondDistribution",
-              "PrognCondition")
-exportMethods("show", 
-              "plot", 
-              "coerce", 
-              "dim") 
-exportMethods("ConvexContamination", 
-              "ContaminationSize", 
-              "TotalVarDist", 
-              "AsymTotalVarDist", 
-              "OAsymTotalVarDist", 
-              "KolmogorovDist", 
-              "HellingerDist",
-              "CvMDist") 
-exportMethods("support",
-              "cond", 
-              "location", "location<-", 
-              "Range",
-              "scale", "scale<-",
-              "Min","shape", 
-              "Min<-","shape<-",
-              "+", "*",
-              "name", "name<-", 
-              "E", "var", "IQR", "skewness", "kurtosis", 
-              "sd", "median", "mad", 
-			  "m1df", "m2df",
-              "liesInSupport")
-export("EuclCondition") 
-export("LMParameter")
-export("DiscreteMVDistribution",
-       "LMCondDistribution")
-export("ConvexContamination")
-export("GLIntegrate",
-       "distrExIntegrate") 
-export("distrExOptions", "getdistrExOption",
-       "distrExMASK", "distrExoptions", "distrExMOVED")
-export("make01","PrognCondDistribution",
-       "PrognCondition")
-export(".getIntbounds")
+useDynLib("distrEx")
+
+import("methods")
+import("distr")
+
+exportClasses("Condition", "EuclCondition") 
+exportClasses("LMParameter")
+exportClasses("MultivariateDistribution", 
+              "DiscreteMVDistribution",
+              "UnivariateCondDistribution",
+              "DiscreteCondDistribution", 
+              "AbscontCondDistribution",
+              "PrognCondition")
+exportMethods("show", 
+              "plot", 
+              "coerce", 
+              "dim") 
+exportMethods("ConvexContamination", 
+              "ContaminationSize", 
+              "TotalVarDist", 
+              "AsymTotalVarDist", 
+              "OAsymTotalVarDist", 
+              "KolmogorovDist", 
+              "HellingerDist",
+              "CvMDist") 
+exportMethods("support",
+              "cond", 
+              "location", "location<-", 
+              "Range",
+              "scale", "scale<-",
+              "Min","shape", 
+              "Min<-","shape<-",
+              "+", "*",
+              "name", "name<-", 
+              "E", "var", "IQR", "skewness", "kurtosis", 
+              "sd", "median", "mad", 
+			  "m1df", "m2df",
+              "liesInSupport")
+export("EuclCondition") 
+export("LMParameter")
+export("DiscreteMVDistribution",
+       "EmpiricalMVDistribution",
+       "LMCondDistribution")
+export("ConvexContamination")
+export("GLIntegrate",
+       "distrExIntegrate") 
+export("distrExOptions", "getdistrExOption",
+       "distrExMASK", "distrExoptions", "distrExMOVED")
+export("make01","PrognCondDistribution",
+       "PrognCondition")
+export(".getIntbounds")

Added: branches/distr-2.6/pkg/distrEx/R/EmpiricalMVDistribution.R
===================================================================
--- branches/distr-2.6/pkg/distrEx/R/EmpiricalMVDistribution.R	                        (rev 0)
+++ branches/distr-2.6/pkg/distrEx/R/EmpiricalMVDistribution.R	2014-08-14 16:20:36 UTC (rev 961)
@@ -0,0 +1,7 @@
+###############################################################################
+## Generating function to generate empirical distribution given some data
+###############################################################################
+
+EmpiricalMVDistribution <- function(data, Symmetry = NoSymmetry()){
+  DiscreteMVDistribution(supp = data, Symmetry = Symmetry)
+}

Modified: branches/distr-2.6/pkg/distrEx/man/0distrEx-package.Rd
===================================================================
--- branches/distr-2.6/pkg/distrEx/man/0distrEx-package.Rd	2014-08-14 16:05:27 UTC (rev 960)
+++ branches/distr-2.6/pkg/distrEx/man/0distrEx-package.Rd	2014-08-14 16:20:36 UTC (rev 961)
@@ -1,255 +1,255 @@
-\name{distrEx-package}
-\alias{distrEx-package}
-\alias{distrEx}
-\docType{package}
-\title{
-distrEx -- Extensions of package distr
-}
-\description{
-\pkg{distrEx} proides some extensions of package \pkg{distr}:
-\itemize{\item expectations in the form
-         \itemize{\item \code{E(X)} for the expectation of a 
-                        distribution object \code{X} 
-                  \item \code{E(X,f)} for the expectation of \code{f(X)} 
-                         where \code{X} is some distribution object and 
-                         \code{f} some function in \code{X} }
-\item further functionals: var, sd, IQR, mad, median, skewness, kurtosis
-\item truncated moments,
-\item distances between distributions
-     (Hellinger, Cramer von Mises, Kolmogorov, total variation, "convex contamination")
-\item lists of distributions,
-\item conditional distributions in factorized form 
-\item conditional expectations in factorized form
-}
-Support for  extreme value distributions has moved to package \pkg{RobExtremes}
-}
-
-\details{
-\tabular{ll}{
-Package: \tab distrEx \cr
-Version: \tab 2.6 \cr
-Date: \tab 2013-09-18 \cr
-Depends: \tab R(>= 2.6.0), methods, distr(>= 2.2) \cr
-LazyLoad: \tab yes \cr
-License: \tab LGPL-3 \cr
-URL: \tab http://distr.r-forge.r-project.org/\cr
-SVNRevision: \tab 926 \cr
-}
-}
-\section{Classes}{
-\preformatted{
-
-Distribution Classes
-
-"Distribution" (from distr)
-|>"UnivariateDistribution" (from distr)
-|>|>"AbscontDistribution" (from distr)
-|>|>|>"Gumbel"
-|>|>|>"Pareto"
-|>|>|>"GPareto"
-|>"MultivariateDistribution"
-|>|>"DiscreteMVDistribution-class"
-|>"UnivariateCondDistribution"
-|>|>"AbscontCondDistribution"
-|>|>|>"PrognCondDistribution"
-|>|>"DiscreteCondDistribution"
-
-
-Condition Classes
-
-"Condition"
-|>"EuclCondition"
-|>"PrognCondition"
-
-Parameter Classes
-
-"OptionalParameter" (from distr)
-|>"Parameter" (from distr)
-|>|>"LMParameter"
-|>|>"GumbelParameter"
-|>|>"ParetoParameter"
-}
-}
-\section{Functions}{
-
-\preformatted{
-
-Integration:
-GLIntegrate             Gauss-Legendre quadrature
-distrExIntegrate        Integration of one-dimensional functions
-
-Options:
-distrExOptions          Function to change the global variables of the
-                        package 'distrEx'
-Standardization:
-make01                  Centering and standardization of univariate
-                        distributions
-
-}}
-
-\section{Generating Functions}{
-\preformatted{
-
-Distribution Classes
-ConvexContamination     Generic function for generating convex
-                        contaminations
-DiscreteMVDistribution
-                        Generating function for
-                        DiscreteMVDistribution-class
-Gumbel                  Generating function for Gumbel-class
-LMCondDistribution      Generating function for the conditional
-                        distribution of a linear regression model.
-
-Condition Classes
-EuclCondition           Generating function for EuclCondition-class
-
-Parameter Classes
-LMParameter             Generating function for LMParameter-class
-
-}}
-\section{Methods}{
-\preformatted{
-Distances:
-ContaminationSize       Generic function for the computation of the
-                        convex contamination (Pseudo-)distance of two
-                        distributions
-HellingerDist           Generic function for the computation of the
-                        Hellinger distance of two distributions
-KolmogorovDist          Generic function for the computation of the
-                        Kolmogorov distance of two distributions
-TotalVarDist            Generic function for the computation of the
-                        total variation distance of two distributions
-AsymTotalVarDist        Generic function for the computation of the
-                        asymmetric total variation distance of two distributions
-                        (for given ratio rho of negative to positive part of deviation)
-OAsymTotalVarDist       Generic function for the computation of the minimal (in rho)
-                        asymmetric total variation distance of two distributions
-vonMisesDist            Generic function for the computation of the
-                        von Mises distance of two distributions
-
-liesInSupport           Generic function for testing the support of a
-                        distribution
-
-
-Functionals:
-E                       Generic function for the computation of
-                        (conditional) expectations
-var                     Generic functions for the computation of
-                        functionals
-IQR                     Generic functions for the computation of
-                        functionals
-sd                      Generic functions for the computation of
-                        functionals
-mad                     Generic functions for the computation of
-                        functionals
-median                  Generic functions for the computation of
-                        functionals
-skewness                Generic functions for the computation of
-                        functionals
-kurtosis                Generic functions for the computation of
-                        Functionals
-
-
-truncated Moments:
-m1df                    Generic function for the computation of clipped
-                        first moments
-m2df                    Generic function for the computation of clipped
-                        second moments
-
-}
-}
-
-\section{Demos}{
-Demos are available --- see \code{demo(package="distrEx")}.}
-
-\section{Acknowledgement}{
-G. Jay Kerns, \email{gkerns at ysu.edu}, has provided a major contribution,
-in particular the functionals \code{skewness} and \code{kurtosis} are due to him.
-Natalyia Horbenko, \email{natalyia.horbenko at itwm.fraunhofer.de} has ported
-the \pkg{actuar} code for the Pareto distribution to this setup. 
-}
-
-\note{
-Some functions of package \pkg{stats} have intentionally been masked, but 
-completely retain their functionality --- see \code{distrExMASK()}.
-
-If any of the packages \pkg{e1071}, \pkg{moments}, \pkg{fBasics} is to be used 
-together with \pkg{distrEx} the latter must be attached \emph{after} any of the 
-first mentioned. Otherwise \code{kurtosis()} and \code{skewness()}
-defined as \emph{methods} in \pkg{distrEx} may get masked.\cr  To re-mask, you 
-may use  \code{kurtosis <- distrEx::kurtosis; skewness <- distrEx::skewness}. 
-See also \code{distrExMASK()}
-}
-
-\section{Start-up-Banner}{
-You may suppress the start-up banner/message completely by setting 
-\code{options("StartupBanner"="off")} somewhere before loading this package by 
-\code{library} or \code{require} in your R-code / R-session.
-
-If option \code{"StartupBanner"} is not defined (default) or setting    
-\code{options("StartupBanner"=NULL)} or 
-\code{options("StartupBanner"="complete")} the complete start-up banner is 
-displayed.
-
-For any other value of option \code{"StartupBanner"} (i.e., not in 
-\code{c(NULL,"off","complete")}) only the version information is displayed.
-
-The same can be achieved by wrapping the \code{library} or \code{require}  call 
-into either \code{suppressStartupMessages()} or 
-\code{onlytypeStartupMessages(.,atypes="version")}.  
- 
-As for general \code{packageStartupMessage}'s, you may also suppress all
- the start-up banner by wrapping the \code{library} or \code{require} 
- call into \code{suppressPackageStartupMessages()} from 
- \pkg{startupmsg}-version 0.5 on.
- }
-
-\section{Package versions}{
-Note: The first two numbers of package versions do not necessarily reflect
- package-individual development, but rather are chosen for the
- distrXXX family as a whole in order to ease updating "depends"
- information.
-}
-
-\author{
-Matthias Kohl \email{Matthias.Kohl at stamats.de} and \cr
-Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de},\cr 
-
-\emph{Maintainer:}  Matthias Kohl \email{Matthias.Kohl at stamats.de}
-}
-\references{
-P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
-S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6. 
-\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
-
-%a more detailed manual for \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, and \pkg{distrEx} may be downloaded from  
-%\url{http://www.uni-bayreuth.de/departments/math/org/mathe7/DISTR/distr.pdf}\cr
-
-a vignette for packages \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, 
-and \pkg{distrEx} is included into the mere documentation package \pkg{distrDoc} 
-and may be called by \code{require("distrDoc");vignette("distr")}
-
-a homepage to this package is available under\cr
-\url{http://distr.r-forge.r-project.org/}
-
-M. Kohl (2005): \emph{Numerical Contributions to the Asymptotic 
-Theory of Robustness.} PhD Thesis. Bayreuth. Available as 
-\url{http://www.stamats.de/ThesisMKohl.pdf}
-}
-\keyword{package}
-\concept{S4 condition class}
-\concept{S4 distribution class}
-\concept{functional}
-\concept{kurtosis}
-\concept{median}
-\concept{skewness}
-\concept{mad}
-\concept{IQR}
-\concept{var}
-\concept{E}
-\concept{distribution distance}
-\concept{multivariate distribution}
-\concept{conditional distribution}
-\seealso{
-\code{\link[distr:0distr-package]{distr-package}} 
-}
+\name{distrEx-package}
+\alias{distrEx-package}
+\alias{distrEx}
+\docType{package}
+\title{
+distrEx -- Extensions of package distr
+}
+\description{
+\pkg{distrEx} proides some extensions of package \pkg{distr}:
+\itemize{\item expectations in the form
+         \itemize{\item \code{E(X)} for the expectation of a 
+                        distribution object \code{X} 
+                  \item \code{E(X,f)} for the expectation of \code{f(X)} 
+                         where \code{X} is some distribution object and 
+                         \code{f} some function in \code{X} }
+\item further functionals: var, sd, IQR, mad, median, skewness, kurtosis
+\item truncated moments,
+\item distances between distributions
+     (Hellinger, Cramer von Mises, Kolmogorov, total variation, "convex contamination")
+\item lists of distributions,
+\item conditional distributions in factorized form 
+\item conditional expectations in factorized form
+}
+Support for  extreme value distributions has moved to package \pkg{RobExtremes}
+}
+
+\details{
+\tabular{ll}{
+Package: \tab distrEx \cr
+Version: \tab 2.6 \cr
+Date: \tab 2013-09-18 \cr
+Depends: \tab R(>= 2.10.0), methods, distr(>= 2.2) \cr
+LazyLoad: \tab yes \cr
+License: \tab LGPL-3 \cr
+URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 926 \cr
+}
+}
+\section{Classes}{
+\preformatted{
+
+Distribution Classes
+
+"Distribution" (from distr)
+|>"UnivariateDistribution" (from distr)
+|>|>"AbscontDistribution" (from distr)
+|>|>|>"Gumbel"
+|>|>|>"Pareto"
+|>|>|>"GPareto"
+|>"MultivariateDistribution"
+|>|>"DiscreteMVDistribution-class"
+|>"UnivariateCondDistribution"
+|>|>"AbscontCondDistribution"
+|>|>|>"PrognCondDistribution"
+|>|>"DiscreteCondDistribution"
+
+
+Condition Classes
+
+"Condition"
+|>"EuclCondition"
+|>"PrognCondition"
+
+Parameter Classes
+
+"OptionalParameter" (from distr)
+|>"Parameter" (from distr)
+|>|>"LMParameter"
+|>|>"GumbelParameter"
+|>|>"ParetoParameter"
+}
+}
+\section{Functions}{
+
+\preformatted{
+
+Integration:
+GLIntegrate             Gauss-Legendre quadrature
+distrExIntegrate        Integration of one-dimensional functions
+
+Options:
+distrExOptions          Function to change the global variables of the
+                        package 'distrEx'
+Standardization:
+make01                  Centering and standardization of univariate
+                        distributions
+
+}}
+
+\section{Generating Functions}{
+\preformatted{
+
+Distribution Classes
+ConvexContamination     Generic function for generating convex
+                        contaminations
+DiscreteMVDistribution
+                        Generating function for
+                        DiscreteMVDistribution-class
+Gumbel                  Generating function for Gumbel-class
+LMCondDistribution      Generating function for the conditional
+                        distribution of a linear regression model.
+
+Condition Classes
+EuclCondition           Generating function for EuclCondition-class
+
+Parameter Classes
+LMParameter             Generating function for LMParameter-class
+
+}}
+\section{Methods}{
+\preformatted{
+Distances:
+ContaminationSize       Generic function for the computation of the
+                        convex contamination (Pseudo-)distance of two
+                        distributions
+HellingerDist           Generic function for the computation of the
+                        Hellinger distance of two distributions
+KolmogorovDist          Generic function for the computation of the
+                        Kolmogorov distance of two distributions
+TotalVarDist            Generic function for the computation of the
+                        total variation distance of two distributions
+AsymTotalVarDist        Generic function for the computation of the
+                        asymmetric total variation distance of two distributions
+                        (for given ratio rho of negative to positive part of deviation)
+OAsymTotalVarDist       Generic function for the computation of the minimal (in rho)
+                        asymmetric total variation distance of two distributions
+vonMisesDist            Generic function for the computation of the
+                        von Mises distance of two distributions
+
+liesInSupport           Generic function for testing the support of a
+                        distribution
+
+
+Functionals:
+E                       Generic function for the computation of
+                        (conditional) expectations
+var                     Generic functions for the computation of
+                        functionals
+IQR                     Generic functions for the computation of
+                        functionals
+sd                      Generic functions for the computation of
+                        functionals
+mad                     Generic functions for the computation of
+                        functionals
+median                  Generic functions for the computation of
+                        functionals
+skewness                Generic functions for the computation of
+                        functionals
+kurtosis                Generic functions for the computation of
+                        Functionals
+
+
+truncated Moments:
+m1df                    Generic function for the computation of clipped
+                        first moments
+m2df                    Generic function for the computation of clipped
+                        second moments
+
+}
+}
+
+\section{Demos}{
+Demos are available --- see \code{demo(package="distrEx")}.}
+
+\section{Acknowledgement}{
+G. Jay Kerns, \email{gkerns at ysu.edu}, has provided a major contribution,
+in particular the functionals \code{skewness} and \code{kurtosis} are due to him.
+Natalyia Horbenko, \email{natalyia.horbenko at itwm.fraunhofer.de} has ported
+the \pkg{actuar} code for the Pareto distribution to this setup. 
+}
+
+\note{
+Some functions of package \pkg{stats} have intentionally been masked, but 
+completely retain their functionality --- see \code{distrExMASK()}.
+
+If any of the packages \pkg{e1071}, \pkg{moments}, \pkg{fBasics} is to be used 
+together with \pkg{distrEx} the latter must be attached \emph{after} any of the 
+first mentioned. Otherwise \code{kurtosis()} and \code{skewness()}
+defined as \emph{methods} in \pkg{distrEx} may get masked.\cr  To re-mask, you 
+may use  \code{kurtosis <- distrEx::kurtosis; skewness <- distrEx::skewness}. 
+See also \code{distrExMASK()}
+}
+
+\section{Start-up-Banner}{
+You may suppress the start-up banner/message completely by setting 
+\code{options("StartupBanner"="off")} somewhere before loading this package by 
+\code{library} or \code{require} in your R-code / R-session.
+
+If option \code{"StartupBanner"} is not defined (default) or setting    
+\code{options("StartupBanner"=NULL)} or 
+\code{options("StartupBanner"="complete")} the complete start-up banner is 
+displayed.
+
+For any other value of option \code{"StartupBanner"} (i.e., not in 
+\code{c(NULL,"off","complete")}) only the version information is displayed.
+
+The same can be achieved by wrapping the \code{library} or \code{require}  call 
+into either \code{suppressStartupMessages()} or 
+\code{onlytypeStartupMessages(.,atypes="version")}.  
+ 
+As for general \code{packageStartupMessage}'s, you may also suppress all
+ the start-up banner by wrapping the \code{library} or \code{require} 
+ call into \code{suppressPackageStartupMessages()} from 
+ \pkg{startupmsg}-version 0.5 on.
+ }
+
+\section{Package versions}{
+Note: The first two numbers of package versions do not necessarily reflect
+ package-individual development, but rather are chosen for the
+ distrXXX family as a whole in order to ease updating "depends"
+ information.
+}
+
+\author{
+Matthias Kohl \email{Matthias.Kohl at stamats.de} and \cr
+Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de},\cr 
+
+\emph{Maintainer:}  Matthias Kohl \email{Matthias.Kohl at stamats.de}
+}
+\references{
+P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
+S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6. 
+\url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
+
+%a more detailed manual for \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, and \pkg{distrEx} may be downloaded from  
+%\url{http://www.uni-bayreuth.de/departments/math/org/mathe7/DISTR/distr.pdf}\cr
+
+a vignette for packages \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, 
+and \pkg{distrEx} is included into the mere documentation package \pkg{distrDoc} 
+and may be called by \code{require("distrDoc");vignette("distr")}
+
+a homepage to this package is available under\cr
+\url{http://distr.r-forge.r-project.org/}
+
+M. Kohl (2005): \emph{Numerical Contributions to the Asymptotic 
+Theory of Robustness.} PhD Thesis. Bayreuth. Available as 
+\url{http://www.stamats.de/ThesisMKohl.pdf}
+}
+\keyword{package}
+\concept{S4 condition class}
+\concept{S4 distribution class}
+\concept{functional}
+\concept{kurtosis}
+\concept{median}
+\concept{skewness}
+\concept{mad}
+\concept{IQR}
+\concept{var}
+\concept{E}
+\concept{distribution distance}
+\concept{multivariate distribution}
+\concept{conditional distribution}
+\seealso{
+\code{\link[distr:0distr-package]{distr-package}} 
+}

Modified: branches/distr-2.6/pkg/distrEx/man/DiscreteMVDistribution.Rd
===================================================================
--- branches/distr-2.6/pkg/distrEx/man/DiscreteMVDistribution.Rd	2014-08-14 16:05:27 UTC (rev 960)
+++ branches/distr-2.6/pkg/distrEx/man/DiscreteMVDistribution.Rd	2014-08-14 16:20:36 UTC (rev 961)
@@ -1,50 +1,50 @@
-\name{DiscreteMVDistribution}
-\alias{DiscreteMVDistribution}
-
-\title{Generating function for DiscreteMVDistribution-class}
-\description{
-  Generates an object of class \code{"DiscreteMVDistribution"}.
-}
-\usage{
-DiscreteMVDistribution(supp, prob, Symmetry = NoSymmetry())
-}
-\arguments{
-  \item{supp}{ numeric matrix whose rows form the support 
-    of the discrete multivariate distribution. }
-  \item{prob}{ vector of probability weights for the 
-    elements of \code{supp}.}
-  \item{Symmetry}{you may help \R in calculations if you tell it whether
-    the distribution is non-symmetric (default) or symmetric with respect
-    to a center.}
-}
-\details{
-   Typical usages are
-   \preformatted{
-     DiscreteMVDistribution(supp, prob)
-     DiscreteMVDistribution(supp)
-   }
-  Identical rows are collapsed to unique support values. 
-  If \code{prob} is missing, all elements in \code{supp}
-  are equally weighted. 
-}
-\value{Object of class \code{"DiscreteMVDistribution"}}
-%\references{}
-\author{Matthias Kohl \email{Matthias.Kohl at stamats.de}}
-%\note{}
-\seealso{\code{DiscreteMVDistribution-class}}
-\examples{
-# Dirac-measure at (0,0,0)
-D1 <- DiscreteMVDistribution(supp = c(0,0,0))
-support(D1)
-
-# simple discrete distribution
-D2 <- DiscreteMVDistribution(supp = matrix(c(0,1,0,2,2,1,1,0), ncol=2), 
-                prob = c(0.3, 0.2, 0.2, 0.3))
-support(D2)
-r(D2)(10)
-}
-\concept{multivariate distribution}
-\concept{discrete distribution}
-\keyword{distribution}
-\concept{S4 distribution class}
-\concept{generating function}
+\name{DiscreteMVDistribution}
+\alias{DiscreteMVDistribution}
+
+\title{Generating function for multivariate discrete distribution}
+\description{
+  Generates an object of class \code{"DiscreteMVDistribution"}.
+}
+\usage{
+DiscreteMVDistribution(supp, prob, Symmetry = NoSymmetry())
+}
+\arguments{
+  \item{supp}{ numeric matrix whose rows form the support 
+    of the discrete multivariate distribution. }
+  \item{prob}{ vector of probability weights for the 
+    elements of \code{supp}.}
+  \item{Symmetry}{you may help \R in calculations if you tell it whether
+    the distribution is non-symmetric (default) or symmetric with respect
+    to a center.}
+}
+\details{
+  Typical usages are
+  \preformatted{
+    DiscreteMVDistribution(supp, prob)
+    DiscreteMVDistribution(supp)
+  }
+  Identical rows are collapsed to unique support values. 
+  If \code{prob} is missing, all elements in \code{supp}
+  are equally weighted. 
+}
+\value{Object of class \code{"DiscreteMVDistribution"}}
+%\references{}
+\author{Matthias Kohl \email{Matthias.Kohl at stamats.de}}
+%\note{}
+\seealso{\code{\link{DiscreteMVDistribution-class}}}
+\examples{
+# Dirac-measure at (0,0,0)
+D1 <- DiscreteMVDistribution(supp = c(0,0,0))
+support(D1)
+
+# simple discrete distribution
+D2 <- DiscreteMVDistribution(supp = matrix(c(0,1,0,2,2,1,1,0), ncol=2), 
+                prob = c(0.3, 0.2, 0.2, 0.3))
+support(D2)
+r(D2)(10)
+}
+\concept{multivariate distribution}
+\concept{discrete distribution}
+\keyword{distribution}
+\concept{S4 distribution class}
+\concept{generating function}

Added: branches/distr-2.6/pkg/distrEx/man/EmpiricalMVDistribution.Rd
===================================================================
--- branches/distr-2.6/pkg/distrEx/man/EmpiricalMVDistribution.Rd	                        (rev 0)
+++ branches/distr-2.6/pkg/distrEx/man/EmpiricalMVDistribution.Rd	2014-08-14 16:20:36 UTC (rev 961)
@@ -0,0 +1,49 @@
+\name{EmpiricalMVDistribution}
+\alias{EmpiricalMVDistribution}
+
+\title{Generating function for mulitvariate discrete distribution}
+\description{
+  Generates an object of class \code{"DiscreteMVDistribution"}.
+}
+\usage{
+EmpiricalMVDistribution(data, Symmetry = NoSymmetry())
+}
+\arguments{
+  \item{data}{ numeric matrix with data where the rows are 
+    interpreted as observations. }
+  \item{Symmetry}{you may help \R in calculations if you tell it whether
+    the distribution is non-symmetric (default) or symmetric with respect
+    to a center.}
+}
+\details{
+  The function is a simple utility function providing a wrapper to the 
+  generating function \code{\link{DiscreteDistribution}}.
+  
+  Typical usages are
+  \preformatted{
+    EmpiricalMVDistribution(data)
+  }
+   
+  Identical rows are collapsed to unique support values. 
+  If \code{prob} is missing, all elements in \code{supp}
+  are equally weighted. 
+}
+\value{Object of class \code{"DiscreteMVDistribution"}}
+%\references{}
+\author{Matthias Kohl \email{Matthias.Kohl at stamats.de}}
+%\note{}
+\seealso{\code{\link{DiscreteMVDistribution}}}
+\examples{
+## generate some data
+X <- matrix(rnorm(50), ncol = 5)
+
+## empirical distribution of X
+D1 <- EmpiricalMVDistribution(data = X)
+support(D1)
+r(D1)(10)
+}
+\concept{multivariate distribution}
+\concept{empirical distribution}
+\keyword{distribution}
+\concept{S4 distribution class}
+\concept{generating function}

Modified: branches/distr-2.6/pkg/distrEx/src/GLaw.c
===================================================================
--- branches/distr-2.6/pkg/distrEx/src/GLaw.c	2014-08-14 16:05:27 UTC (rev 960)
+++ branches/distr-2.6/pkg/distrEx/src/GLaw.c	2014-08-14 16:20:36 UTC (rev 961)
@@ -1,5 +1,5 @@
 #include <math.h>
-#define PI 3.141592653589793
+/*#define PI 3.141592653589793*/
 #include <R.h>
 #include <Rinternals.h>
 #include <Rmath.h>		/* constants */
@@ -46,4 +46,4 @@
 	return AW;
 }
 
-*/
\ No newline at end of file
+*/



More information about the Distr-commits mailing list