[Distr-commits] r838 - in pkg: SweaveListingUtils SweaveListingUtils/R SweaveListingUtils/inst SweaveListingUtils/man SweaveListingUtils/tests/Examples distr distr/R distr/demo distr/inst distr/man distr/tests/Examples distrDoc distrDoc/inst distrDoc/man distrDoc/vignettes distrEllipse distrEllipse/man distrEx distrEx/R distrEx/inst distrEx/man distrEx/src distrMod distrMod/R distrMod/inst distrMod/inst/scripts distrMod/man distrMod/tests/Examples distrMod/vignettes distrSim distrSim/R distrSim/inst distrSim/man distrSim/tests/Examples distrTEst distrTEst/inst distrTEst/man distrTEst/tests/Examples distrTeach distrTeach/inst distrTeach/man distrTeach/tests/Examples startupmsg startupmsg/inst startupmsg/tests/Examples utils

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 9 02:00:00 CET 2013


Author: ruckdeschel
Date: 2013-01-09 02:00:00 +0100 (Wed, 09 Jan 2013)
New Revision: 838

Added:
   pkg/distrEx/R/moved2RobExtremes.R
   pkg/distrEx/inst/MOVED
   pkg/distrEx/man/distrExMOVED.Rd
   pkg/utils/R.bat
   pkg/utils/RBuild.bat
   pkg/utils/RCheck.bat
   pkg/utils/RInstall.bat
   pkg/utils/RRversions.bat
   pkg/utils/RZip.bat
   pkg/utils/Rversions.bat
   pkg/utils/pmake
   pkg/utils/ppmake.bat
   pkg/utils/ppmakeDoc.bat
   pkg/utils/updateTo2_4.R
Removed:
   pkg/distrEx/R/AllInitialize.R
   pkg/distrEx/R/GEV.R
   pkg/distrEx/R/GPareto.R
   pkg/distrEx/R/Gumbel.R
   pkg/distrEx/R/Pareto.R
   pkg/distrEx/R/kMAD.R
   pkg/distrEx/man/GEV-class.Rd
   pkg/distrEx/man/GEV.Rd
   pkg/distrEx/man/GEVParameter-class.Rd
   pkg/distrEx/man/GPareto-class.Rd
   pkg/distrEx/man/GPareto.Rd
   pkg/distrEx/man/GParetoParameter-class.Rd
   pkg/distrEx/man/Gumbel-class.Rd
   pkg/distrEx/man/Gumbel.Rd
   pkg/distrEx/man/GumbelParameter-class.Rd
   pkg/distrEx/man/Pareto-class.Rd
   pkg/distrEx/man/Pareto.Rd
   pkg/distrEx/man/ParetoParameter-class.Rd
   pkg/distrEx/man/distrExConstants.Rd
   pkg/distrEx/man/kMAD.Rd
   pkg/distrEx/src/kMad.c
Modified:
   pkg/SweaveListingUtils/DESCRIPTION
   pkg/SweaveListingUtils/R/SweaveListingUtils.R
   pkg/SweaveListingUtils/R/keywordsStyle.R
   pkg/SweaveListingUtils/inst/NEWS
   pkg/SweaveListingUtils/man/0SweaveListingUtils-package.Rd
   pkg/SweaveListingUtils/man/library.Rd
   pkg/SweaveListingUtils/tests/Examples/SweaveListingUtils-Ex.Rout.save
   pkg/distr/.Rbuildignore
   pkg/distr/DESCRIPTION
   pkg/distr/R/0distrOptions.R
   pkg/distr/R/AllClasses.R
   pkg/distr/R/AllInitialize.R
   pkg/distr/R/DiscreteDistribution.R
   pkg/distr/R/LatticeDistribution.R
   pkg/distr/R/bAcDcLcDistribution.R
   pkg/distr/R/internalUtils.R
   pkg/distr/R/internals-qqplot.R
   pkg/distr/R/plot-methods.R
   pkg/distr/R/plot-methods_LebDec.R
   pkg/distr/R/qqbounds.R
   pkg/distr/R/qqplot.R
   pkg/distr/demo/nFoldConvolution.R
   pkg/distr/inst/NEWS
   pkg/distr/man/0distr-package.Rd
   pkg/distr/man/plot-methods.Rd
   pkg/distr/tests/Examples/distr-Ex.Rout.save
   pkg/distrDoc/DESCRIPTION
   pkg/distrDoc/NAMESPACE
   pkg/distrDoc/inst/NEWS
   pkg/distrDoc/man/0distrDoc-package.Rd
   pkg/distrDoc/vignettes/distr.Rnw
   pkg/distrEllipse/DESCRIPTION
   pkg/distrEllipse/NAMESPACE
   pkg/distrEllipse/man/0distrEllipse-package.Rd
   pkg/distrEx/DESCRIPTION
   pkg/distrEx/NAMESPACE
   pkg/distrEx/R/AllClass.R
   pkg/distrEx/R/AllGeneric.R
   pkg/distrEx/R/Expectation.R
   pkg/distrEx/R/Functionals.R
   pkg/distrEx/R/Kurtosis.R
   pkg/distrEx/R/Skewness.R
   pkg/distrEx/inst/NEWS
   pkg/distrEx/man/0distrEx-package.Rd
   pkg/distrEx/man/AsymTotalVarDist.Rd
   pkg/distrEx/man/CvMDist.Rd
   pkg/distrEx/man/HellingerDist.Rd
   pkg/distrEx/man/KolmogorovDist.Rd
   pkg/distrEx/man/OAsymTotalVarDist.Rd
   pkg/distrEx/man/TotalVarDist.Rd
   pkg/distrEx/man/Var.Rd
   pkg/distrMod/.Rbuildignore
   pkg/distrMod/DESCRIPTION
   pkg/distrMod/NAMESPACE
   pkg/distrMod/R/0distrModOptions.R
   pkg/distrMod/R/0distrModUtils.R
   pkg/distrMod/R/AllClass.R
   pkg/distrMod/R/AllGeneric.R
   pkg/distrMod/R/AllReturnClasses.R
   pkg/distrMod/R/AllShow.R
   pkg/distrMod/R/Estimator.R
   pkg/distrMod/R/L2GroupFamilies-methods.R
   pkg/distrMod/R/L2GroupFamilies.R
   pkg/distrMod/R/MCEstimator.R
   pkg/distrMod/R/MDEstimator.R
   pkg/distrMod/R/MLEstimator.R
   pkg/distrMod/R/ParamFamParameter.R
   pkg/distrMod/R/SimpleL2ParamFamilies.R
   pkg/distrMod/R/confint.R
   pkg/distrMod/R/internalMleCalc.R
   pkg/distrMod/R/mleCalc-methods.R
   pkg/distrMod/R/modifyModel.R
   pkg/distrMod/R/setAs.R
   pkg/distrMod/R/validParameter.R
   pkg/distrMod/inst/NEWS
   pkg/distrMod/inst/scripts/example_CvMMDE.R
   pkg/distrMod/inst/scripts/examples2.R
   pkg/distrMod/inst/scripts/modelExp3.R
   pkg/distrMod/man/0distrMod-package.Rd
   pkg/distrMod/man/InternalReturnClasses-class.Rd
   pkg/distrMod/man/L2LocationFamily-class.Rd
   pkg/distrMod/man/L2LocationFamily.Rd
   pkg/distrMod/man/MCEstimate-class.Rd
   pkg/distrMod/man/MDEstimator.Rd
   pkg/distrMod/man/MLEstimator.Rd
   pkg/distrMod/man/ParamFamParameter-class.Rd
   pkg/distrMod/man/ParamFamParameter.Rd
   pkg/distrMod/man/ParamFamily.Rd
   pkg/distrMod/man/internalClassUnions-class.Rd
   pkg/distrMod/man/internalmleHelpers.Rd
   pkg/distrMod/man/internals.Rd
   pkg/distrMod/man/mleCalc-methods.Rd
   pkg/distrMod/man/trafo-methods.Rd
   pkg/distrMod/man/validParameter-methods.Rd
   pkg/distrMod/tests/Examples/distrMod-Ex.Rout.save
   pkg/distrMod/vignettes/distrMod.Rnw
   pkg/distrSim/DESCRIPTION
   pkg/distrSim/NAMESPACE
   pkg/distrSim/R/AllClasses.R
   pkg/distrSim/inst/NEWS
   pkg/distrSim/man/0distrSim-package.Rd
   pkg/distrSim/tests/Examples/distrSim-Ex.Rout.save
   pkg/distrTEst/DESCRIPTION
   pkg/distrTEst/NAMESPACE
   pkg/distrTEst/inst/NEWS
   pkg/distrTEst/man/0distrTEst-package.Rd
   pkg/distrTEst/tests/Examples/distrTEst-Ex.Rout.save
   pkg/distrTeach/DESCRIPTION
   pkg/distrTeach/NAMESPACE
   pkg/distrTeach/inst/NEWS
   pkg/distrTeach/man/0distrTeach-package.Rd
   pkg/distrTeach/tests/Examples/distrTeach-Ex.Rout.save
   pkg/startupmsg/DESCRIPTION
   pkg/startupmsg/inst/NEWS
   pkg/startupmsg/tests/Examples/startupmsg-Ex.Rout.save
   pkg/utils/DESCRIPTIONutils.R
   pkg/utils/NEWS
   pkg/utils/README-batchfiles
   pkg/utils/finde.r
   pkg/utils/getRevNr.R
   pkg/utils/ladealles.R
   pkg/utils/pmake.bat
   pkg/utils/pmakeDoc.bat
   pkg/utils/showsvnlog.R
Log:
merged branch 2.4 into pkg (trunk)

Modified: pkg/SweaveListingUtils/DESCRIPTION
===================================================================
--- pkg/SweaveListingUtils/DESCRIPTION	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/SweaveListingUtils/DESCRIPTION	2013-01-09 01:00:00 UTC (rev 838)
@@ -1,19 +1,17 @@
 Package: SweaveListingUtils
 Title: Utilities for Sweave together with TeX listings package
 Encoding: latin1
-Version: 0.5.5
+Version: 0.6
 Depends: R(>= 2.10.0), startupmsg
 Suggests: distr, MASS, survival, distrEx, Matrix, splines
 Imports: stats
 ByteCompile: yes
 Author: Peter Ruckdeschel
-Description: provides utilities for defining R / Rd as Tex-package-listings "language" and
-        including R / Rd source file (sniplets) copied from R-forge in its most recent version
-        (or another url) thereby avoiding inconsistencies between vignette and documented
-        source code
+Description: provides utilities for defining R / Rd as Tex-package-listings "language" and including R / Rd source file (sniplets) copied from R-forge in its most
+             recent version (or another url) thereby avoiding inconsistencies between vignette and documented source code
 Maintainer: Peter Ruckdeschel <Peter.Ruckdeschel at itwm.fraunhofer.de>
 License: LGPL-3
-Date: 2012-02-06
+Date: 2013-01-09
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
-SVNRevision: 787
+SVNRevision: 834

Modified: pkg/SweaveListingUtils/R/SweaveListingUtils.R
===================================================================
--- pkg/SweaveListingUtils/R/SweaveListingUtils.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/SweaveListingUtils/R/SweaveListingUtils.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -76,7 +76,7 @@
 
    sws <- .SweaveListingOptions
    sws$inSweave <- TRUE
-   assignInNamespace(".SweaveListingOptions", sws, "SweaveListingUtils")
+   assignInMyNamespace(".SweaveListingOptions", sws)
 
    withVerbatim <- rep(withVerbatim, length.out=3)
    if(is.null(names(withVerbatim)))

Modified: pkg/SweaveListingUtils/R/keywordsStyle.R
===================================================================
--- pkg/SweaveListingUtils/R/keywordsStyle.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/SweaveListingUtils/R/keywordsStyle.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -169,7 +169,7 @@
 require <- function(package, lib.loc = NULL, quietly = FALSE,
              warn.conflicts = TRUE,
              keep.source = getOption("keep.source.pkgs"),
-             character.only = FALSE, version, save = TRUE, inSweave,
+             character.only = FALSE, save = TRUE, inSweave,
              keywordstyles, interm.keywordstyles, overwrite, intermediate){
              pkg <- as.character(substitute(package))
              mc <- as.list(match.call(expand.dots = FALSE))[-1]
@@ -180,8 +180,8 @@
 library <- function(package, help, pos = 2, lib.loc = NULL,
     character.only = FALSE,
     logical.return = FALSE, warn.conflicts = TRUE,
-    keep.source = getOption("keep.source.pkgs"),
-    verbose = getOption("verbose"), version, inSweave,
+    quietly = FALSE, keep.source = getOption("keep.source.pkgs"),
+    verbose = getOption("verbose"), inSweave,
     keywordstyles, interm.keywordstyles, overwrite, intermediate){
              pkg <- as.character(substitute(package))
              mc <- as.list(match.call(expand.dots = FALSE))[-1]
@@ -253,7 +253,7 @@
 }
 
 
-setBaseOrRecommended <- function(pkgs,kws = NULL){
+setBaseOrRecommended <- function(pkgs,kws =NULL){
       idxRec <- as.logical(isBaseOrRecommended(pkgs = pkgs))
       if(missing(kws)) {
          kws <- rep(getSweaveListingOption("Keywordstyle"),

Modified: pkg/SweaveListingUtils/inst/NEWS
===================================================================
--- pkg/SweaveListingUtils/inst/NEWS	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/SweaveListingUtils/inst/NEWS	2013-01-09 01:00:00 UTC (rev 838)
@@ -3,6 +3,31 @@
 ######################################################################
  
 ##############
+v 0.6
+##############
+
+under the hood:
+
++ added DESCRIPTION tag "ByteCompile" to all our packages
++ updating maintainer email address and URL.
++ added argument no.readonly = TRUE to assignments of form opar <- par()
++ .Rbuildignore  as a reaction to B. Ripley's mail on r-devel, "CRAN package sizes",  Feb-14-2011, 
++ created folder vignettes and moved content of inst/doc/ to it
++ removed lazyload tag in DESCRIPTION
++ deleted inst/doc folder
++ argument kws in setBaseOrRecommended() gains default value
++ changed assignment from assignInNamespace to assignInMyNamespace
++ alerted by Kurt Hornik: added several packages to "suggests" tag in DESCRIPTION (trunk)
++ wrapped calls to readLines in SourceFromRForge in try() in order to avoid errors when R-forge site is down (triggered by B. Ripley's mail from Feb 1, 2012).
++ removed obsolete base-argument "version" of library, require 
++ NOTE included in starting message that support will stop soon and that rather pkg knitr is to be used
++ fixed wrong argument structure for library() 
+
+BUGFIXES:
++ fixed strip.white issue in pkg SweaveListingUtils
++ changed chunk option strip.white from FALSE to false
+
+##############
 v 0.5
 ##############
 

Modified: pkg/SweaveListingUtils/man/0SweaveListingUtils-package.Rd
===================================================================
--- pkg/SweaveListingUtils/man/0SweaveListingUtils-package.Rd	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/SweaveListingUtils/man/0SweaveListingUtils-package.Rd	2013-01-09 01:00:00 UTC (rev 838)
@@ -15,12 +15,12 @@
 \details{
 \tabular{ll}{
 Package: \tab SweaveListingUtils \cr
-Version: \tab 0.5 \cr
-Date: \tab 2010-12-03 \cr
+Version: \tab 0.6 \cr
+Date: \tab 2013-01-09 \cr
 Depends: \tab R(>= 2.10.0), startupmsg \cr
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
-SVNRevision: \tab 699 \cr
+SVNRevision: \tab 834 \cr
 }
 
 TeX-package \file{listings}, confer \url{http://www.ctan.org/tex-archive/macros/latex/contrib/listings/},

Modified: pkg/SweaveListingUtils/man/library.Rd
===================================================================
--- pkg/SweaveListingUtils/man/library.Rd	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/SweaveListingUtils/man/library.Rd	2013-01-09 01:00:00 UTC (rev 838)
@@ -14,20 +14,21 @@
   also register corresponding symbols. Besides this registration, they
   behave identically to the original versions of package \pkg{base}.
   Hence much of this help is also just copied from the original help page.
+  As the original may have changed in the mean time in doubt please rely
+  on the original help page.
 }
 \usage{
 library(package, help, pos = 2, lib.loc = NULL,
         character.only = FALSE, logical.return = FALSE,
-        warn.conflicts = TRUE,
+        warn.conflicts = TRUE, quietly = FALSE,
         keep.source = getOption("keep.source.pkgs"),
-        verbose = getOption("verbose"),
-        version, inSweave,
+        verbose = getOption("verbose"), inSweave,
         keywordstyles, interm.keywordstyles, overwrite, intermediate)
 
 require(package, lib.loc = NULL, quietly = FALSE,
         warn.conflicts = TRUE,
         keep.source = getOption("keep.source.pkgs"),
-        character.only = FALSE, version, save = TRUE, inSweave,
+        character.only = FALSE, save = TRUE, inSweave,
         keywordstyles, interm.keywordstyles, overwrite, intermediate)
 }
 \arguments{
@@ -46,9 +47,6 @@
     Non-existent library trees are silently ignored.}
   \item{character.only}{a logical indicating whether \code{package} or
     \code{help} can be assumed to be character strings.}
-  \item{version}{A character string denoting a version number of the
-     package to be loaded, for use with \emph{versioned installs}: see
-     the section later in this document.}
   \item{logical.return}{logical.  If it is \code{TRUE},  \code{FALSE} or
     \code{TRUE} is returned to indicate success.}
   \item{warn.conflicts}{logical.  If \code{TRUE}, warnings are
@@ -128,8 +126,8 @@
   \code{library} and \code{require} are masked versions of the original
   versions in package \pkg{base}. This masking is necessary to allow for
   extra arguments \code{keywordstyles}, \code{interm.keywordstyles},
-  \code{overwrite}, \code{intermediate}. Hence please confer
-  \code{\link[base]{library}}, \code{\link[base:library]{require}}.\cr
+  \code{overwrite}, \code{intermediate}. Hence please in case of doubt
+  see \code{\link[base]{library}}, \code{\link[base:library]{require}}.\cr
 
   If argument \code{inSweave} is \code{FALSE} or if argument
   \code{inSweave} is missing and the corresponding global

Modified: pkg/SweaveListingUtils/tests/Examples/SweaveListingUtils-Ex.Rout.save
===================================================================
--- pkg/SweaveListingUtils/tests/Examples/SweaveListingUtils-Ex.Rout.save	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/SweaveListingUtils/tests/Examples/SweaveListingUtils-Ex.Rout.save	2013-01-09 01:00:00 UTC (rev 838)
@@ -1,5 +1,5 @@
 
-R version 2.15.0 Patched (2012-05-26 r59450) -- "Easter Beagle"
+R version 2.15.1 Patched (2012-06-29 r59688) -- "Roasted Marshmallows"
 Copyright (C) 2012 The R Foundation for Statistical Computing
 ISBN 3-900051-07-0
 Platform: x86_64-unknown-linux-gnu (64-bit)
@@ -23,14 +23,13 @@
 > options(warn = 1)
 > library('SweaveListingUtils')
 Loading required package: startupmsg
-:startupmsg>  Utilities for start-up messages (version 0.7.3)
+:startupmsg>  Utilities for start-up messages (version 0.8)
 :startupmsg> 
 :startupmsg>  For more information see ?"startupmsg",
 :startupmsg>  NEWS("startupmsg")
 
 :SweaveListingUtils>  Utilities for Sweave together with
-:SweaveListingUtils>  TeX listings package (version
-:SweaveListingUtils>  0.5.5)
+:SweaveListingUtils>  TeX listings package (version 0.6)
 :SweaveListingUtils> 
 :SweaveListingUtils>  Some functions from package 'base'
 :SweaveListingUtils>  are intentionally masked ---see
@@ -421,7 +420,7 @@
 \def\Code#1{{\tt\color{Rcolor} #1}}
 \def\file#1{{\tt #1}} 
 \def\pkg#1{{\tt "#1"}} 
-\newcommand{\pkgversion}{{\tt 2.3.4}}
+\newcommand{\pkgversion}{{\tt 2.4}}
 %------------------------------------------------------------------------------%
 Warning in setBaseOrRecommended(pkgs = pkgs) :
   number of items to replace is not a multiple of replacement length
@@ -652,28 +651,28 @@
 listFromMethods,linearizeMlist,languageEl<-,languageEl,isXS3Class,%
 isVirtualClass,isSealedMethod,isSealedClass,isGroup,isGrammarSymbol,%
 isGeneric,isClassUnion,isClassDef,isClass,insertSource,%
-insertMethod,initialize,initRefFields,initFieldArgs,inheritedSlotNames,%
-implicitGeneric,hasMethods,hasMethod,hasLoadAction,hasArg,%
-getVirtual,getValidity,getSubclasses,getSlots,getRefClass,%
-getPrototype,getProperties,getPackageName,getMethodsMetaData,getMethodsForDispatch,%
-getMethods,getMethod,getLoadActions,getGroupMembers,getGroup,%
-getGenerics,getGeneric,getFunction,getExtends,getDataPart,%
-getClasses,getClassPackage,getClassName,getClassDef,getClass,%
-getAllSuperClasses,getAllMethods,getAccess,generic.skeleton,functionBody<-,%
-functionBody,formalArgs,fixPre1.8,findUnique,findMethods,%
-findMethodSignatures,findMethod,findFunction,findClass,finalDefaultMethod,%
-extends,existsMethod,existsFunction,evalqOnLoad,evalSource,%
-evalOnLoad,emptyMethodsList,empty.dump,elNamed<-,elNamed,%
-el<-,el,dumpMethods,dumpMethod,doPrimitiveMethod,%
-defaultPrototype,defaultDumpName,conformMethod,completeSubclasses,completeExtends,%
-completeClassDefinition,coerce<-,coerce,classesToAM,className,%
-classMetaName,classLabel,checkSlotAssignment,cbind2,canCoerce,%
-callNextMethod,callGeneric,cacheMethod,cacheMetaData,cacheGenericsMetaData,%
-body<-,balanceMethodsList,assignMethodsMetaData,assignClassDef,asMethodDefinition,%
-as<-,allNames,allGenerics,addNextMethod,Summary,%
-SignatureMethod,S3Part<-,S3Part,S3Class<-,S3Class,%
-Quote,MethodsListSelect,MethodsList,MethodAddCoerce,Math2,%
-Logic,Complex,Compare,Arith%
+insertMethod,insertClassMethods,initialize,initRefFields,initFieldArgs,%
+inheritedSlotNames,implicitGeneric,hasMethods,hasMethod,hasLoadAction,%
+hasArg,getVirtual,getValidity,getSubclasses,getSlots,%
+getRefClass,getPrototype,getProperties,getPackageName,getMethodsMetaData,%
+getMethodsForDispatch,getMethods,getMethod,getLoadActions,getGroupMembers,%
+getGroup,getGenerics,getGeneric,getFunction,getExtends,%
+getDataPart,getClasses,getClassPackage,getClassName,getClassDef,%
+getClass,getAllSuperClasses,getAllMethods,getAccess,generic.skeleton,%
+functionBody<-,functionBody,formalArgs,fixPre1.8,findUnique,%
+findMethods,findMethodSignatures,findMethod,findFunction,findClass,%
+finalDefaultMethod,extends,existsMethod,existsFunction,evalqOnLoad,%
+evalSource,evalOnLoad,emptyMethodsList,empty.dump,elNamed<-,%
+elNamed,el<-,el,dumpMethods,dumpMethod,%
+doPrimitiveMethod,defaultPrototype,defaultDumpName,conformMethod,completeSubclasses,%
+completeExtends,completeClassDefinition,coerce<-,coerce,classesToAM,%
+className,classMetaName,classLabel,checkSlotAssignment,cbind2,%
+canCoerce,callNextMethod,callGeneric,cacheMethod,cacheMetaData,%
+cacheGenericsMetaData,body<-,balanceMethodsList,assignMethodsMetaData,assignClassDef,%
+asMethodDefinition,as<-,allNames,allGenerics,addNextMethod,%
+Summary,SignatureMethod,S3Part<-,S3Part,S3Class<-,%
+S3Class,Quote,MethodsListSelect,MethodsList,MethodAddCoerce,%
+Math2,Logic,Complex,Compare,Arith%
 },%
 keywordstyle={[9]{\bf\color{RRecomdcolor}}},%
 %
@@ -2078,7 +2077,7 @@
 > 
 > readPkgVersion(package = "distr")
      Version
-[1,] "2.3.4"
+[1,] "2.4"  
 > 
 > 
 > 
@@ -3322,7 +3321,7 @@
 > ### * <FOOTER>
 > ###
 > cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  0.316 0.044 2.043 0 0 
+Time elapsed:  0.308 0.04 2.315 0 0 
 > grDevices::dev.off()
 null device 
           1 

Modified: pkg/distr/.Rbuildignore
===================================================================
--- pkg/distr/.Rbuildignore	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/.Rbuildignore	2013-01-09 01:00:00 UTC (rev 838)
@@ -1,2 +1,2 @@
 inst/doc/Rplots.pdf
-^.*\.svn.*
+^.*\.svn.+

Modified: pkg/distr/DESCRIPTION
===================================================================
--- pkg/distr/DESCRIPTION	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/DESCRIPTION	2013-01-09 01:00:00 UTC (rev 838)
@@ -1,6 +1,6 @@
 Package: distr
-Version: 2.3.4
-Date: 2011-11-18
+Version: 2.4
+Date: 2013-01-09
 Title: Object oriented implementation of distributions
 Description: S4 Classes and Methods for distributions
 Author: Florian Camphausen, Matthias Kohl, Peter Ruckdeschel, Thomas Stabla
@@ -14,4 +14,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
-SVNRevision: 754
+SVNRevision: 834

Modified: pkg/distr/R/0distrOptions.R
===================================================================
--- pkg/distr/R/0distrOptions.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/R/0distrOptions.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -1,4 +1,4 @@
-.distrExInstalled <- ("distrEx" %in% installed.packages())
+.distrExInstalled <- !all(is.na(packageDescription("distrEx")))
 
 .distroptions <- list(
                       DefaultNrGridPoints = 2^12,

Modified: pkg/distr/R/AllClasses.R
===================================================================
--- pkg/distr/R/AllClasses.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/R/AllClasses.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -1,8 +1,9 @@
 ############# preparations ################
 # (.onload, .onattach ...)
-.onLoad <- function(lib, pkg) { # extended 03-28-06: P.R. 
+### left out P.R. 01-09-11
+##.onLoad <- function(lib, pkg) { # extended 03-28-06: P.R. 
 ##    require("methods", character = TRUE, quietly = TRUE)
-}
+##}
 
 
 

Modified: pkg/distr/R/AllInitialize.R
===================================================================
--- pkg/distr/R/AllInitialize.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/R/AllInitialize.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -279,14 +279,14 @@
             
              OS  <- D at support 
 
-#             if(is.null(lattice))  
-#               {  if(! .is.vector.lattice(OS))
-#                      stop("Support as given/generated is not a lattice.")
-#                  .Object at lattice <- .make.lattice.es.vector(OS)
-#             }else{
+             #if(is.null(lattice))  
+             #  {  if(! .is.vector.lattice(OS))
+             #         stop("Support as given/generated is not a lattice.")
+             #     .Object at lattice <- .make.lattice.es.vector(OS)
+             #}else{
                   .Object at lattice <- if(is.null(lattice )) 
                           new("Lattice") else lattice
-#             }
+             #}
 
 
             .Object at support <- OS

Modified: pkg/distr/R/DiscreteDistribution.R
===================================================================
--- pkg/distr/R/DiscreteDistribution.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/R/DiscreteDistribution.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -508,3 +508,4 @@
                   )
 
 
+          
\ No newline at end of file

Modified: pkg/distr/R/LatticeDistribution.R
===================================================================
--- pkg/distr/R/LatticeDistribution.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/R/LatticeDistribution.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -242,7 +242,10 @@
                      pr0 <- sup00*0
                      pr0[sup01] <- (prob(d0))[sup10]
                      pr0 <- pr0/sum(pr0)                              
-                     e0 <- LatticeDistribution(supp=sup00, prob=pr0)           
+                     lat <- Lattice(pivot = sup00[1], width = md, 
+                                    Length = length(sup00))
+                     e0 <- LatticeDistribution(supp = sup00, prob = pr0, 
+                                               lattice = lat, check = FALSE)           
                      if(L.inf){
                          e0 at lattice <- if(L.lr>0){ 
                             Lattice(pivot = su12.l, width = wa, Length = Inf) 
@@ -270,8 +273,8 @@
             s1 <- .inWithTol(supp0,sup1-pi1,tol0)
             s2 <- .inWithTol(supp0,sup2-pi2,tol0)
             d1 <- d2 <- 0*supp0
-            d1[s1] <- prob(as(e1,"LatticeDistribution"))
-            d2[s2] <- prob(as(e2,"LatticeDistribution"))
+            d1[s1] <- prob(as(e1,"DiscreteDistribution"))
+            d2[s2] <- prob(as(e2,"DiscreteDistribution"))
 
             L <- length(supp0)
             Ln <- 2^(ceiling(log(L)/log(2))+1)
@@ -333,7 +336,10 @@
                return(DiscreteDistribution(supp = supp2, prob = newd2,
                                            .withArith = TRUE, Symmetry = Symmetry))
             }else{
+               lat <- Lattice(pivot=supp1[1],width=wa, Length=length(supp1))
+
                e0 <- LatticeDistribution(supp = supp1, prob = newd,
+                                         lattice = lat,
                                          .withArith = TRUE, Symmetry = Symmetry,
                                          check = FALSE)
                if(L.inf){

Modified: pkg/distr/R/bAcDcLcDistribution.R
===================================================================
--- pkg/distr/R/bAcDcLcDistribution.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/R/bAcDcLcDistribution.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -156,19 +156,26 @@
 
 setMethod("^", c("AcDcLcDistribution","Integer"),
 function(e1,e2){
+
+           if(.isEqual(e2,0)) return(Dirac(1))
+           if(.isEqual(e2,1)) return(e1)
+
            ep <- getdistrOption("TruncQuantile")
            d00 <- discretePart(e1)@d(0)
            d0 <- discreteWeight(e1)*d00
            if(d0 > ep){
-                d1 <- 1-(1-d0)^e2
-                su <- support(discretePart(e1))
-                pr <- d(discretePart(e1))(su)
-                acW <- acWeight(e1)/(1-d0)
-                discreteP <- DiscreteDistribution(
+                if(.isEqual(d00,1)){
+                   e1 <- acPart(e1)
+                }else{
+                   su <- support(discretePart(e1))
+                   pr <- d(discretePart(e1))(su)
+                   acW <- acWeight(e1)
+                   discreteP <- DiscreteDistribution(
                                 supp = su[su!=0],
                                 prob = pr[su!=0]/(1-d00))
-                e1 <- UnivarLebDecDistribution(acPart = acPart(e1),
-                      discretePart = discreteP, acWeight = acW)
+                   e1 <- UnivarLebDecDistribution(acPart = acPart(e1),
+                         discretePart = discreteP, acWeight = acW)
+                }
                }
 
            e1DC <- decomposePM(e1)
@@ -184,17 +191,20 @@
 
 #
            if(d0 > ep){
-                dw <- discreteWeight(erg)
-                acW <- acWeight(erg) * (1-d1)
-                su <- support(discretePart(erg))
-                su0 <- c(su,0)
-                o <- order(su0)
-                pr <- c(d(discretePart(erg))(su) * dw * (1-d1), d1)
-                suo <- su0[o]
-                pro <- pr[o]/(1-acW)
-                discreteP <- DiscreteDistribution(supp = suo, prob = pro)
-                erg <- UnivarLebDecDistribution(acPart = acPart(erg),
-                       discretePart = discreteP, acWeight = acW)
+                if(.isEqual(d00,1)){
+                    erg <- UnivarLebDecDistribution(acPart = acPart(erg),
+                           discretePart = Dirac(0), acWeight = acW)
+                }else{
+                    su <- support(discretePart(erg))
+                    su0 <- c(su,0)
+                    o <- order(su0)
+                    pr <- c(d(discretePart(erg))(su) * (1-d00), d00)
+                    suo <- su0[o]
+                    pro <- pr[o]
+                    discreteP <- DiscreteDistribution(supp = suo, prob = pro)
+                    erg <- UnivarLebDecDistribution(acPart = acPart(erg),
+                           discretePart = discreteP, acWeight = acW)
+                }
              }
            if(getdistrOption("simplifyD"))
                 erg <- simplifyD(erg)
@@ -240,32 +250,40 @@
 
   ### special treatment if e2>=0 and d.discrete(e1)>0
   if(d0 > ep){
-     d1 <- 1-(1-d0)^e2
-     su <- support(discretePart(e1))
-     pr <- d(discretePart(e1))(su)
-     acW <- acWeight(e1)/(1-d0)
-     discreteP <- DiscreteDistribution(
+     if(.isEqual(d00,1)){
+        e1 <- acPart(e1)
+     }else{
+        su <- support(discretePart(e1))
+        pr <- d(discretePart(e1))(su)
+        acW <- acWeight(e1)#/(1-d0)
+        discreteP <- DiscreteDistribution(
                      supp = su[su!=0],
                      prob = pr[su!=0]/(1-d00))
-     e1 <- UnivarLebDecDistribution(acPart = acPart(e1),
-           discretePart = discreteP, acWeight = acW)
+        e1 <- UnivarLebDecDistribution(acPart = acPart(e1),
+              discretePart = discreteP, acWeight = acW)
+     }
    }
 
    erg <- exp( e2 * log(e1))
 
    ### special treatment if e2>=0 and d.discrete(e1)>0
    if(d0 > ep){
-      dw <- discreteWeight(erg)
-      acW <- acWeight(erg) * (1-d1)
-      su <- support(discretePart(erg))
-      su0 <- c(su,0)
-      o <- order(su0)
-      pr <- c(d(discretePart(erg))(su) * dw * (1-d1), d1)
-      suo <- su0[o]
-      pro <- pr[o]/(1-acW)
-      discreteP <- DiscreteDistribution(supp = suo, prob = pro)
-      erg <- UnivarLebDecDistribution(acPart = acPart(erg),
-             discretePart = discreteP, acWeight = acW)
+      if(.isEqual(d00,1)){
+          erg <- UnivarLebDecDistribution(acPart = acPart(erg),
+                 discretePart = Dirac(0), acWeight = acW)
+      }else{
+#      d1 <- d0 # 1-(1-d0)^e2
+          acW <- acWeight(erg) #* (1-d1)
+          su <- support(discretePart(erg))
+          su0 <- c(su,0)
+          o <- order(su0)
+          pr <- c(d(discretePart(erg))(su) * (1-d00), d00)
+          suo <- su0[o]
+          pro <- pr[o] #/(1-acW)
+          discreteP <- DiscreteDistribution(supp = suo, prob = pro)
+          erg <- UnivarLebDecDistribution(acPart = acPart(erg),
+                      discretePart = discreteP, acWeight = acW)
+     }
    }
 
   if(getdistrOption("simplifyD"))

Modified: pkg/distr/R/internalUtils.R
===================================================================
--- pkg/distr/R/internalUtils.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/R/internalUtils.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -239,6 +239,8 @@
          }
       return(inC)
     })
+if(length(grep("expression",inCx))>0)
+   inCx <- gsub("expression\\(", "", gsub("\\)$","",inCx))
 if (length(inCx) > 1) {
    inCx <- paste(inCx, c(rep(",", length(inCx)-1), ""),
                  sep = "", collapse = "\"\\n\",")
@@ -630,11 +632,12 @@
                  trY <- try(
                  if(is.null(e1 at gaps))
                     gapsnew <- NULL
-                 else {gapsnew <- e1 at gaps * e2
-                       if (e2 < 0) gapsnew <- 
+                 else {gapsnew <- e1 at gaps
+                       if(is.numeric(gapsold)) gapsnew <- matrix(gapsnew * e2, ncol=2)
+                       if (e2 < 0) gapsnew <-
                              gapsnew[rev(seq(nrow(gapsnew))),c(2,1),drop = FALSE] }
                  , silent=TRUE)
-
+                 if(is(trY,"try-error")) gapsnew <- NULL
                  dnew <- .makeD(substitute(e1, list(e1 = e1)),
                                 substitute(alist(x = x / e2), list(e2 = e2)),
                                 stand = abs(e2))
@@ -653,10 +656,12 @@
                  trY <- try(
                  if(is.null(e1 at gaps))
                     gapsnew <- NULL
-                 else {gapsnew <- e1 at gaps * e2
-                       if (e2 < 0) gapsnew <- 
-                            gapsnew[rev(seq(nrow(gapsnew))),c(2,1), drop = FALSE] }
+                 else {gapsold <- e1 at gaps
+                       if(is.numeric(gapsold)) gapsnew <- matrix(gapsnew * e2, ncol=2)
+                       if (e2 < 0) gapsnew <-
+                             gapsnew[rev(seq(nrow(gapsnew))),c(2,1),drop = FALSE] }
                  , silent=TRUE)
+                 if(is(trY,"try-error")) gapsnew <- NULL
 
                  dnew <- .makeD(substitute(e1, list(e1 = e1)),
                                 substitute(alist(x = x / e2), list(e2 = e2)),
@@ -1004,7 +1009,7 @@
                            q = qnew, gaps = gapsnew,
                           .withSim = FALSE, .withArith = TRUE,
                     .logExact = .logExact(e1), .lowerExact = .lowerExact(e1))
-            rm(gapsnew)
+            if(exists("gapsnew")) rm(gapsnew)
             rm(pnew, qnew, dnew, rnew)
             object
           }

Modified: pkg/distr/R/internals-qqplot.R
===================================================================
--- pkg/distr/R/internals-qqplot.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/R/internals-qqplot.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -81,28 +81,44 @@
    x[ord]
 }
 
+
+.pk2 <- if(getRversion()<"2.16.0") function(p0, n){
+                 .C("pkolmogorov2x", p = as.double(p0),
+                     as.integer(n), PACKAGE = "stats")$p
+        }else function(p0,n){
+                 .Call(stats:::C_pKolmogorov2x, p0, n) #, PACKAGE = "stats")
+        }
+.pks2 <- if(getRversion()<"2.16.0") function(x, tol){
+                 .C("pkstwo", as.integer(1),
+                    p = as.double(x), as.double(tol), PACKAGE = "stats")$p
+        }else function(x, tol){
+                 .Call(stats:::C_pKS2, p = x, tol) #, PACKAGE = "stats")
+        }
+
+
 .q2kolmogorov <- function(alpha,n,exact=(n<100)){ ## Kolmogorovstat
+ if(is.numeric(alpha)) alpha <- as.vector(alpha)
+ else stop("Level alpha must be numeric.")
+ if(any(is.na(alpha))) stop("Level alpha must not contain missings.")
  if(exact){
  fct <- function(p0){
  ### from ks.test from package stats:
-    .C("pkolmogorov2x", p = as.double(p0),
-       as.integer(n), PACKAGE = "stats")$p -alpha
+    .pk2(p0,n) -alpha
   }
  res <- uniroot(fct,lower=0,upper=1)$root*sqrt(n)
  }else{
  ### from ks.test from package stats:
- pkstwo <- function(x, tol = 1e-06) {
-        if (is.numeric(x))
-            x <- as.vector(x)
-        else stop("argument 'x' must be numeric")
-        p <- rep(0, length(x))
-        p[is.na(x)] <- NA
-        IND <- which(!is.na(x) & (x > 0))
-        if (length(IND)) {
-            p[IND] <- .C("pkstwo", as.integer(length(x[IND])),
-                p = as.double(x[IND]), as.double(tol), PACKAGE = "stats")$p
-        }
-        return(p)
+ pkstwo <- function(x, tol = 1e-09) {
+        #if (is.numeric(x))
+        #    x <- as.vector(x)
+        #else stop("argument 'x' must be numeric")
+        #p <- rep(0, length(x))
+        #p[is.na(x)] <- NA
+        #IND <- which(!is.na(x) & (x > 0))
+        #if (length(IND)) {
+            .pks2(x,tol) -alpha
+        #}
+        # return(p)
     }
  ###  end of code from package stats
  fct <- function(p0){
@@ -204,7 +220,8 @@
    SI.c <- SIi>0
    x.in <- x[SI.in]
    x.c <- x.in[SI.c]
-   x.d <- x.in[!SI.c]
+   x.d <- x.in[!SI.c]        
+   
 
    qqb <- qqbounds(x,D,alpha,n,withConf.pw, withConf.sim,
                    exact.sCI,exact.pCI,nosym.pCI)
@@ -286,7 +303,8 @@
     mcl$col.IdL <- mcl$alpha.CI <- mcl$lty.IdL <-  NULL
     mcl$col.NotInSupport <- mcl$check.NotInSupport <- NULL
     mcl$exact.sCI <- mcl$exact.pCI <- NULL
-    mcl$withConf <- mcl$withIdLine <- mcl$distance <- NULL
+    mcl$withConf <- mcl$withConf.sim <- mcl$withConf.pw <- NULL
+    mcl$withIdLine <- mcl$distance <- NULL
     mcl$col.pCI <- mcl$lty.pCI <- mcl$col.sCI <- mcl$lty.sCI <- NULL
     mcl$lwd.IdL <- mcl$lwd.pCI <- mcl$lwd.sCI <- NULL
     mcl$withLab <- mcl$lab.pts <- mcl$which.lbs <- NULL

Modified: pkg/distr/R/plot-methods.R
===================================================================
--- pkg/distr/R/plot-methods.R	2013-01-09 00:40:25 UTC (rev 837)
+++ pkg/distr/R/plot-methods.R	2013-01-09 01:00:00 UTC (rev 838)
@@ -33,7 +33,7 @@
      dots.for.points <- dots[names(dots) %in% c("bg", "lwd", "lty")]
      if (length(dots.for.points) == 0 ) dots.for.points <- NULL
 
-     dots.without.pch <- dots[! (names(dots) %in% c("pch", "log"))]
+     dots.without.pch <- dots[! (names(dots) %in% c("pch", "log", "xlab", "ylab"))]
      if(!is(x,"AbscontDistribution"))
          x <- .ULC.cast(x)     
      ###
@@ -98,6 +98,42 @@
                             qparamstring,
                             as.character(deparse(xc))))
      
+     xlab0 <- list("d"="x", "p"="q", "q"="p")
+     iL <- 1:length(to.draw)
+     .mp2 <- function(dlb = dots$xlab, lb0 = list("d"="x", "p"="q", "q"="p")){
+              dlb0 <- eval(dlb)
+              if (!is.null(dlb)){
+              .mp <- if(is.list(dlb0)) function(x,i){
+                                if(is.call(x)) x <- eval(x)
+                                if(length(i)==0) return(NULL)
+                                i <- min(i)
+                                if(is.character(x[[i]])){
+                                   return(as.character(eval(.mpresubs(x[[i]]))))
+                                }else{
+                                res <- .mpresubs(x[[i]])
+                                if(length(res)==0) return(NULL)
+                                if(is.call(res)) res <- res[-1]
+                                return(res)}
+                                }else function(x,i){
+                                  res <- x[i]
+                                  if(length(res)==0) return(NULL)
+                                  if(is.na(res)) return(NULL)
+                                  return(res)}
+              force(lb0)
+              .mp3 <- .mp(dlb,iL[to.draw==1])
+              if(1%in%to.draw & !is.null(.mp3)) lb0[["d"]] <- .mp3
+              .mp3 <- .mp(dlb,iL[to.draw==2])
+              if(2%in%to.draw & !is.null(.mp3)) lb0[["p"]] <- .mp3
+              .mp3 <- .mp(dlb,iL[to.draw==3])
+              if(3%in%to.draw & !is.null(.mp3)) lb0[["q"]] <- .mp3
+
+             }
+             return(lb0)}
+     xlab0 <- .mp2()
+     dots$xlab <- NULL
+     ylab0 <- .mp2(dlb=dots$ylab, lb0=list("d"="d(x)", "p"="p(q)", "q"="q(p)"))
+     dots$ylab <- NULL
+
      if (hasArg(main)){
          mainL <- TRUE
          if (is.logical(main)){
@@ -199,7 +235,7 @@
      if(1%in%to.draw){
          on.exit(options(warn=o.warn))
          do.call(plot, c(list(x = grid, dxg, type = "l", 
-             ylim = ylim1,  ylab = "d(x)", xlab = "x", log = logpd), 
+             ylim = ylim1,  ylab = ylab0[["d"]], xlab = xlab0[["d"]], log = logpd),
              dots.without.pch))
          options(warn = o.warn)
      
@@ -214,7 +250,7 @@
 
      if(2%in%to.draw){
         do.call(plot, c(list(x = grid, pxg, type = "l", 
-             ylim = ylim2, ylab = "p(q)", xlab = "q", log = logpd), 
+             ylim = ylim2, ylab = ylab0[["p"]], xlab = xlab0[["p"]], log = logpd),
              dots.without.pch))
         options(warn = o.warn)
       
@@ -254,7 +290,7 @@
      if(3%in%to.draw){
         options(warn = -1)
         do.call(plot, c(list(x = po, xo, type = "n", 
-             xlim = ylim2, ylim = xlim, ylab = "q(p)", xlab = "p", 
+             xlim = ylim2, ylim = xlim, ylab = ylab0[["q"]], xlab = xlab0[["q"]],
              log = logq), dots.without.pch))
         options(warn = o.warn)
     
@@ -322,14 +358,13 @@
       }
       l.draw <- length(to.draw)
 
-
       dots$ngrid <- NULL
 
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/distr -r 838


More information about the Distr-commits mailing list