[Distr-commits] r417 - in branches/distr-2.1/pkg: SweaveListingUtils/chm SweaveListingUtils/inst/doc distr/R distr/chm distrEx/R distrEx/chm distrEx/man distrMod/R distrMod/chm

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Mar 19 13:22:18 CET 2009


Author: ruckdeschel
Date: 2009-03-19 13:22:18 +0100 (Thu, 19 Mar 2009)
New Revision: 417

Modified:
   branches/distr-2.1/pkg/SweaveListingUtils/chm/SweaveListingUtils.chm
   branches/distr-2.1/pkg/SweaveListingUtils/inst/doc/ExampleSweaveListingUtils.Rnw
   branches/distr-2.1/pkg/SweaveListingUtils/inst/doc/preambleExp.tex
   branches/distr-2.1/pkg/distr/R/plot-methods.R
   branches/distr-2.1/pkg/distr/R/plot-methods_LebDec.R
   branches/distr-2.1/pkg/distr/chm/Distr.chm
   branches/distr-2.1/pkg/distrEx/R/Expectation.R
   branches/distr-2.1/pkg/distrEx/R/Expectation_LebDec.R
   branches/distr-2.1/pkg/distrEx/chm/E.html
   branches/distr-2.1/pkg/distrEx/chm/distrEx.chm
   branches/distr-2.1/pkg/distrEx/man/E.Rd
   branches/distr-2.1/pkg/distrMod/R/0distrModUtils.R
   branches/distr-2.1/pkg/distrMod/R/AllPlot.R
   branches/distr-2.1/pkg/distrMod/R/L2GroupFamilies.R
   branches/distr-2.1/pkg/distrMod/R/modifyModel.R
   branches/distr-2.1/pkg/distrMod/chm/distrMod.chm
   branches/distr-2.1/pkg/distrMod/chm/modifyModel-methods.html
Log:
distr: enhanced automatic plotting range selection
distrEx: some typo's in integration range selection
distrMod: enhanced Covariance calculation for CvMDist-MDE 
          some minor issues in L2GroupFamilies (if locscalename is missing)
SweaveListingUtils: updated and extended vignette ExampleSweaveListingUtils.Rnw

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

Modified: branches/distr-2.1/pkg/SweaveListingUtils/inst/doc/ExampleSweaveListingUtils.Rnw
===================================================================
--- branches/distr-2.1/pkg/SweaveListingUtils/inst/doc/ExampleSweaveListingUtils.Rnw	2009-03-18 23:25:32 UTC (rev 416)
+++ branches/distr-2.1/pkg/SweaveListingUtils/inst/doc/ExampleSweaveListingUtils.Rnw	2009-03-19 12:22:18 UTC (rev 417)
@@ -20,6 +20,10 @@
 \usepackage{ifpdf}
 %
 \usepackage{amssymb}
+\usepackage{url}  
+%
+\usepackage[authoryear,round,longnamesfirst]{natbib}
+%
 \usepackage[%
 baseurl={r-forge.r-project.org},%
 pdftitle={How to work with SweaveListingUtils},%
@@ -36,6 +40,7 @@
 \newcommand{\Reals}{\mathbb{R}}
 \newcommand{\R}{\mathbb{R}}
 \newcommand{\N}{\mathbb{N}}
+\newcommand{\hreft}[1]{\href{#1}{\tt\small\url{#1}}}
 %
 % -------------------------------------------------------------------------------
 \RequirePackage{listings}
@@ -80,7 +85,22 @@
 \pkg{SweaveListingUtils} in a vignette.
 % -------------------------------------------------------------------------------
 \end{abstract}
+%
 % -------------------------------------------------------------------------------
+\section[What package SweaveListingUtils is for]{What package {\tt SweaveListingUtils} is for}
+% -------------------------------------------------------------------------------
+Package \pkg{SweaveListingUtils}  
+provides utilities for combining {\tt Sweave}, confer \citet{Lei:02a,Lei:02b,Lei:03}.  
+with functionality of \TeX-package-\file{listings}, confer \citet{H:M:07}. 
+In particular, we define {\sf R} / {\tt Rd} as \TeX-package-\file{listings}
+"language" and functionality to include {\sf R} / {\tt Rd} source file 
+(sniplets) copied from an url, by default from the {\tt svn} server at 
+\href{http://r-forge.r-project.org/}{R-forge}, confer \citet{RForge} in 
+its most recent version, thereby avoiding inconsistencies between vignette and 
+documented source code.
+In this respect it supports (and to some extent enhances) {\tt Sweave}.
+%
+% -------------------------------------------------------------------------------
 \section{Preparations: Preamble}
 % -------------------------------------------------------------------------------
 You should include into the preamble of your \file{.Rnw} file something like
@@ -91,15 +111,28 @@
 %------------
 \lstinputlisting[style=TeXstyle]{preamble.tex}
 Actually, after \code{Sweave}-ing the \file{.Rnw} file
-to a corresponding \file{.tex} file,   this should expand to something like
+to a corresponding \file{.tex} file,  will expand to a rather long form
+(depending on which packages you have attached), but you should not worry
+about your document getting very long, as the inserted \TeX commands 
+(or more precisely {\tt listings}-package commands only declare
+the list(s) of registered keywords (for later markup).\\
+In our case this should expand to something like\newline
+%
+\begin{footnotesize}
+%
 %------------
 % use \lstinputlisting{....} 
 % to avoid that Sweave interprets the chunks in preambleExp.tex
 %------------
-\lstinputlisting[style=TeXstyle]{preambleExp.tex}
+\lstinputlisting[style=TeXstyle,basicstyle=\footnotesize]{preambleExp.tex}
+%
+\end{footnotesize}
+%
 % -------------------------------------------------------------------------------
-\section{Example of code coloring}
+\section{Listings markup}
 % -------------------------------------------------------------------------------
+\subsection{Example of code coloring}
+% -------------------------------------------------------------------------------
 Any keyword of some new {\sf R} package ``loaded in'' by \code{require} 
 or \code{library} which is on the \code{search} list item of this package
 afterwords when used in \lstinline[style=TeXstyle]`\lstinline{ .... }` or
@@ -108,7 +141,7 @@
 More specifically, with argument \code{keywordstyles} of functions
 \code{setToBeDefinedPkgs} or \code{lstsetLanguage} 
 all packages may obtain their own style; in the preamble, for instance,
-package \pkg{SweaveListingUtils} is colored blue, and 
+package \pkg{SweaveListingUtils} is colored blue, and package
 \pkg{distr} (to be attached just now) will be colored red.
 Also, comments are set in a different style (by default using color 
 \code{Rcomment}). Of course, instead of colors, you may use any other markup,
@@ -130,6 +163,9 @@
 require(distr)
 @
 
+The next example takes up package \pkg{distr}, confer \citet{R:K:S:C:04},
+to illustrate particular markup for a particular package.
+
 %
 Example (note the different colorings):
 %------------
@@ -151,10 +187,117 @@
 
 {\bf Remark: }{\tt .Rd} keywords will be taken from file \file{Rdlistings.sty} 
 in the \file{TeX} subfolder of this package,
-which is according to Duncan Murdoch's ``Parsing Rd Files'' as of Nov. 4 2008.
+which is according to \citet{Murd:08}.
+% -------------------------------------------------------------------------------
+\subsection{Changing the markup}
+% -------------------------------------------------------------------------------
+%
+Triggered by an e-mail by David Carslaw, this subsection lists some possibilities 
+howto change the (default) markup of code.
 
+\paragraph{Changing the global settings: }
 %
+The default markup for {\sf R} code is set in a global option 
+\code{Rset} to be inspected by
+<<LookAtRset>>=
+getSweaveListingOption("Rset")
+@
+
+Similarly, default markup for {\tt Rd} code is set in a global option 
+\code{Rset} to be inspected by
+<<LookAtRdset>>=
+getSweaveListingOption("Rdset")
+@ 
+
+The inspection / modification mechanism for these global options
+is the same as for the {\sf R} global options, i.e., instead of
+the functions \code{options}, \code{getOption}, we have functions
+\code{SweaveListingoptions}, \code{getSweaveListingOption}; see also
+\code{?getSweaveListingOption}.\medskip\\
+
+\noindent Some comments are due: 
+
+The items of this list are just the tagged 
+{\tt name = value} list items to be passed as arguments to 
+(\TeX-){\tt listings} command {\tt lstset}, and you may include any 
+{\tt name = value} pair allowed for \lstset{}. For details confer the
+documentation of the {\tt listings} package, \citet{H:M:07}. 
+
+As usual in {\sf R}, backslashes have to be escaped,
+giving the double appearance in the examples listed above.
+ 
+For cooperation of  {\tt listings}
+with {\tt Sweave}, it is necessary, however, to use the tagged pair 
+{\tt "fancyvrb" = "true"}. 
+
+The colors used in the default setting
+are also set as global ({\tt SweaveListing}-)options ---
+i.e.; \code{Rcolor}, \code{Rcomment}, \code{Rdcolor}.  
+
+Item {\tt "literate"} will be discussed in the next subsection.
+
+Using the escape character defined as item {\tt "escapechar"},
+you may force \TeX to typeset (parts of) your comments in \TeX style,
+which is handy for mathematical formula.
+
+\paragraph{Changing the markup settings without changing defaults at startup: }
+%
+Alternatively, you may change global markup without modifying 
+({\tt SweaveListing}-)option  \code{"Rset"}. To this end you may build 
+up your own (local) \code{"Rset"}-list,
+say \code{Rset0}. This is most easily done by first copying the global default 
+list and then by modifying some items by simple {\sf R} list operations.
+This might give the following alternative preparatory chunk to
+be inserted at the beginning of your {\tt .Rnw} file.
+%------------
+% use \lstinputlisting{....} 
+% to avoid that Sweave interprets the chunks in altPrep.tex
+%------------
+\lstinputlisting[style=TeXstyle]{altPrep.tex}
+
+\paragraph{Changing the markup locally: }
+If you want to change the markup style within some {\tt .Rnw} file, use
+something like:
+
+%------------
+% use \lstinputlisting{....} 
+% to avoid that Sweave interprets the chunks in locChange.tex
+%------------
+\lstinputlisting[style=TeXstyle]{locChange.tex}
+
+This will add/replace item \code{"basicstyle"} to/in the existing items.
+For {\tt Rd}-style you may use a respective call to \code{lstsetRd()}.
+
+%
 % -------------------------------------------------------------------------------
+\subsection{Using literate programming}
+% -------------------------------------------------------------------------------
+%
+This is ---to some degree--- a matter of taste: {\sf R} has two assignment
+operators, which when typed look like {\color{Rcolor}\tt <-} and 
+{\color{Rcolor}\verb|<<-|}; now literally these are interpreted as one token;
+the same goes for comparison operators like {\color{Rcolor} \tt <=}.
+One idea of literate programming is to replace these tokens by special
+symbols like $\leftarrow$, $\twoheadleftarrow$, $\le$ for printing to enhance
+readability --- think of easy confusions arising between {\color{Rcolor}\tt <-}
+and {\color{Rcolor}\tt < -}.
+
+\TeX-package {\tt listings}, confer \citet{H:M:07}, to this end has the directive 
+{\tt literate}, and in
+our default setting for {\sf R} markup, we use it at least for the replacement 
+of the assignments. 
+
+Note that the {\tt .Rnw} file still contains valid {\sf R} code
+in the chunks; \code{stangle} will work just fine --- the chunks are just output 
+by \TeX\ in a somewhat transformed way.
+
+A considerable part of {\sf R} would rather prefer to see the code output
+``as you type it''; if you tend to think like this, you are free of course
+to change the default markup as described in the previous section. 
+%
+%
+%
+% -------------------------------------------------------------------------------
 \section{Including Code Sniplets from R Forge}
 % -------------------------------------------------------------------------------
 When documenting code, which is not necessarily of the same package, and be it 
@@ -210,15 +353,59 @@
 
 %
 
-\begin{thebibliography}{1}
+\begin{thebibliography}{7}
+%
+\bibitem[Heinz and Moses (2007)]{H:M:07}
+Heinz, C and Moses, B (2007)
+\newblock {{The {\sf Listings} package.} Manual for \TeX\ package {\tt listings}
+version 1.4.}
+\newblock \hreft{http://www.ctan.org/get/macros/latex/contrib/listings/listings.pdf}.
+%
 
-\bibitem{R:K:S:C:04}
-Ruckdeschel P., Kohl M., Stabla T., and Camphausen F. 
-\newblock {S4 Classes for Distributions.} 
-\newblock {\em R-News\/}, {\bf 6}(2): 10--13.
-\newblock http://CRAN.R-project.org/doc/Rnews/Rnews\_2006-2.pdf
+\bibitem[Leisch (2002a)]{Lei:02a}
+Leisch, F  (2002a)
+\newblock {Sweave: Dynamic generation of statistical reports.}
+\newblock  In: H{\"a}rdle, W and R{\"o}nz, B (eds): 
+           {\emph{Compstat 2002 - Proceedings in Computational Statistics.\/}}
+           pp.~575--580. Physika Verlag, Heidelberg.
+\newblock \hreft{http://www.statistik.lmu.de/~leisch/Sweave/}.
+%
+
+\bibitem[Leisch (2002b)]{Lei:02b}
+Leisch, F  (2002b)
+\newblock {Sweave, Part I: Mixing R and \LaTeX.}
+\newblock \emph{R-News\/}, {\bf 2}(3): 28--31.
+\newblock \hreft{http://cran.r-project.org/doc/Rnews/Rnews_2002-3.pdf}.
+%
+
+\bibitem[Leisch (2003)]{Lei:03}
+Leisch, F  (2003)
+\newblock {Sweave, Part II: Package Vignettes.}
+\newblock \emph{R-News\/}, {\bf 3}(2): 21--24.
+\newblock \hreft{http://cran.r-project.org/doc/Rnews/Rnews_2003-2.pdf}.
+%
+
+\bibitem[{Murdoch (2008)}]{Murd:08}
+Murdoch, D (2008)
+\newblock {Parsing Rd Files. Technical Report on {\tt developer.r-project.org}} as of Nov. 4 2008.
+\newblock \hreft{http://developer.r-project.org/parseRd.pdf}.
+%
+
+\bibitem[{{R-Forge Administration and Development Team}(2008)}]{RForge}
+{R-Forge Administration and Development Team} (2008).
+\newblock \emph{R-Forge User's Manual}.
+\newblock \hreft{http://download.R-Forge.R-project.org/R-Forge.pdf}.
+%
+
+\bibitem[{Ruckdeschel et al.\ (2006)}]{R:K:S:C:04}
+Ruckdeschel P, Kohl M, Stabla T, and Camphausen F (2006)
+\newblock {S4 Classes for Distributions.}
+\newblock \emph{R-News\/}, {\bf 6}(2): 10--13.
+\newblock \hreft{http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf}.
 %\newblock See also {http://www.uni-bayreuth.de/departments/math/org/mathe7/RUCKDESCHEL/pubs/distr.pdf}
 
+%
+
 \end{thebibliography}
 
 % -------------------------------------------------------------------------------

Modified: branches/distr-2.1/pkg/SweaveListingUtils/inst/doc/preambleExp.tex
===================================================================
--- branches/distr-2.1/pkg/SweaveListingUtils/inst/doc/preambleExp.tex	2009-03-18 23:25:32 UTC (rev 416)
+++ branches/distr-2.1/pkg/SweaveListingUtils/inst/doc/preambleExp.tex	2009-03-19 12:22:18 UTC (rev 417)
@@ -85,158 +85,16 @@
 %
 %
 
-% --------------------------
-% Registration of package tools
-% --------------------------
-\lstset{morekeywords={[4]Adobe_glyphs,buildVignettes,charset_to_Unicode,%
-checkDocFiles,checkDocStyle,checkFF,checkMD5sums,checkNEWS,%
-checkReplaceFuns,checkS3methods,checkTnF,checkVignettes,codoc,%
-codocClasses,codocData,delimMatch,encoded_text_to_latex,%
-
-... snip ...
-
-vignetteDepends,write_PACKAGES,xgettext,xgettext2pot,xngettext%
-},%
-keywordstyle={[4]{\bf}}%
-}
 %
+...
+snipped expanded \TeX\ code for registration of packages 
+        tools, stats, graphics, grDevices, utils, datasets, methods, base
+...
 %
 
-% --------------------------
-% Registration of package stats
-% --------------------------
-\lstset{morekeywords={[5]acf,acf2AR,add.scope,addmargins,%
-aggregate.data.frame,aggregate.default,aggregate.ts,AIC,%
-anova.glm,anova.glmlist,anova.lm,anova.lmlist,anova.mlm,%
-anovalist.lm,ansari.test,ar,ar.burg,ar.mle,ar.ols,ar.yw,%
-arima,arima.sim,arima0,arima0.diag,ARMAacf,%
-ARMAtoMA,as.dendrogram,as.dist,as.formula,as.hclust,%
-
-... snip ...
-
-weighted.mean,weighted.residuals,wilcox.test,window<-,%
-write.ftable,xtabs%
-},%
-keywordstyle={[5]{\bf}}%
-}
-%
-%
-
-% --------------------------
-% Registration of package graphics
-% --------------------------
-\lstset{morekeywords={[6]assocplot,Axis,axis.Date,axis.POSIXct,%
-axTicks,barplot.default,boxplot.default,boxplot.matrix,cdplot,%
-clip,close.screen,co.intervals,contour.default,dotchart,%
-erase.screen,filled.contour,fourfoldplot,grconvertX,grconvertY,%
-hist.default,image.default,layout.show,lines.default,pairs.default,%
-panel.smooth,pie,plot.default,plot.design,plot.new,plot.window,%
-plot.xy,points.default,spineplot,split.screen,strheight,%
-stripchart,text.default,xspline%
-},%
-keywordstyle={[6]{\bf}}%
-}
-%
-%
-
-% --------------------------
-% Registration of package grDevices
-% --------------------------
-\lstset{morekeywords={[7]as.graphicsAnnot,bitmap,bmp,boxplot.stats,%
-bringToTop,check.options,CIDFont,cm.colors,col2rgb,colorConverter,%
-colorRamp,colorRampPalette,colorspaces,contourLines,convertColor,%
-dev.control,dev.copy,dev.copy2eps,dev.copy2pdf,dev.cur,%
-
-... snip ...
-
-windowsFont,windowsFonts,xfig,xy.coords,xyTable,%
-xyz.coords%
-},%
-keywordstyle={[7]{\bf}}%
-}
-%
-%
-
-% --------------------------
-% Registration of package utils
-% --------------------------
-\lstset{morekeywords={[8]alarm,argsAnywhere,as.person,as.personList,%
-as.relistable,as.roman,assignInNamespace,available.packages,browseEnv,%
-browseURL,browseVignettes,bug.report,capture.output,checkCRAN,%
-choose.dir,choose.files,chooseCRANmirror,citation,citEntry,citFooter,%
-citHeader,close.socket,combn,compareVersion,contrib.url,%
-count.fields,CRAN.packages,data.entry,de.ncols,de.restore,%
-de.setup,DLL.version,download.file,download.packages,dump.frames,%
-
-... snip ...
-
-write.socket,write.table,writeClipboard,wsbrowser,zip.file.extract,%
-zip.unpack%
-},%
-keywordstyle={[8]{\bf}}%
-}
-%
-%
-
-% --------------------------
-% Registration of package datasets
-% --------------------------
-\lstset{morekeywords={[9]ability.cov,airmiles,AirPassengers,airquality,%
-anscombe,attenu,attitude,austres,beaver1,beaver2,%
-BJsales,BJsales.lead,BOD,cars,ChickWeight,%
-chickwts,co2,CO2,crimtab,discoveries,%
-
-... snip ...
-
-uspop,VADeaths,volcano,warpbreaks,women,%
-WorldPhones,WWWusage%
-},%
-keywordstyle={[9]{\bf}}%
-}
-%
-%
-
-% --------------------------
-% Registration of package methods
-% --------------------------
-\lstset{morekeywords={[10]addNextMethod,allGenerics,allNames,Arith,%
-as<-,asMethodDefinition,assignClassDef,assignMethodsMetaData,%
-balanceMethodsList,body<-,cacheGenericsMetaData,cacheMetaData,%
-cacheMethod,callGeneric,callNextMethod,canCoerce,cbind2,%
-checkSlotAssignment,classMetaName,coerce,%
-
-... snip ...
-
-Summary,superClassDepth,testVirtual,traceOff,traceOn,%
-tryNew,trySilent,unRematchDefinition,validObject,validSlotNames%
-},%
-keywordstyle={[10]{\bf}}%
-}
-%
-%
-
-% --------------------------
-% Registration of package base
-% --------------------------
-\lstset{morekeywords={[11]addNA,addTaskCallback,agrep,all.equal,%
-all.equal.character,all.equal.default,all.equal.factor,all.equal.formula,%
-all.equal.language,all.equal.list,all.equal.numeric,all.equal.POSIXct,%
-all.equal.raw,all.names,all.vars,as.array,as.array.default,as.call,%
-as.character,as.character.condition,%
-
-... snip ...
-
-xtfrm.default,xtfrm.factor,xtfrm.numeric_version,xtfrm.POSIXct,xtfrm.POSIXlt,%
-xtfrm.Surv%
-},%
-keywordstyle={[11]{\bf}}%
-}
-%
-%
-
 %------------------------------------------------------------------------------%
 %
 %%
 \lstset%
 {keywordstyle={[2]\bf\color{blue}}
-}%
\ No newline at end of file
+}% 
\ No newline at end of file

Modified: branches/distr-2.1/pkg/distr/R/plot-methods.R
===================================================================
--- branches/distr-2.1/pkg/distr/R/plot-methods.R	2009-03-18 23:25:32 UTC (rev 416)
+++ branches/distr-2.1/pkg/distr/R/plot-methods.R	2009-03-19 12:22:18 UTC (rev 417)
@@ -147,8 +147,13 @@
         inner.q <- if(3%in%to.draw) .mpresubs(inner[[min(iL[to.draw==3])]]) else NULL
      }
 
-     lower <- getLow(x, eps = getdistrOption("TruncQuantile")*2)
-     upper <- getUp(x, eps = getdistrOption("TruncQuantile")*2)
+     lower0 <- getLow(x, eps = getdistrOption("TruncQuantile")*2)
+     upper0 <- getUp(x, eps = getdistrOption("TruncQuantile")*2)
+     me <- q(x)(1/2); s <- q(x)(3/4)-q(x)(1/4)
+     lower1 <- me - 6 * s
+     upper1 <- me + 6 * s
+     lower <- max(lower0, lower1)
+     upper <- min(upper0, upper1)
 
      ## ngrid  nr of gridpoints
      ## exactq two p-values are considered equal if difference is

Modified: branches/distr-2.1/pkg/distr/R/plot-methods_LebDec.R
===================================================================
--- branches/distr-2.1/pkg/distr/R/plot-methods_LebDec.R	2009-03-18 23:25:32 UTC (rev 416)
+++ branches/distr-2.1/pkg/distr/R/plot-methods_LebDec.R	2009-03-19 12:22:18 UTC (rev 417)
@@ -261,13 +261,19 @@
      }
 
 
-     lower <- min(getLow(x at mixDistr[[1]],
+     lower0 <- min(getLow(x at mixDistr[[1]],
                       eps = getdistrOption("TruncQuantile")*2),
                   getLow(x at mixDistr[[2]]))
-     upper <- max(getUp(x at mixDistr[[1]],
+     upper0 <- max(getUp(x at mixDistr[[1]],
                       eps = getdistrOption("TruncQuantile")*2),
                   getUp(x at mixDistr[[2]]))
+     me <- q(x)(1/2); s <- q(x)(3/4)-q(x)(1/4)
+     lower1 <- me - 6 * s
+     upper1 <- me + 6 * s
+     lower <- max(lower0, lower1)
+     upper <- min(upper0, upper1)
 
+
      ## ngrid  nr of gridpoints
      ## exactq two p-values are considered equal if difference is
      ## is less than 10^-exactq in abs. value

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

Modified: branches/distr-2.1/pkg/distrEx/R/Expectation.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/Expectation.R	2009-03-18 23:25:32 UTC (rev 416)
+++ branches/distr-2.1/pkg/distrEx/R/Expectation.R	2009-03-19 12:22:18 UTC (rev 417)
@@ -9,10 +9,10 @@
                          fun = "missing", 
                          cond = "missing"),
     function(object,
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ...
+             IQR.fac = getdistrExOption("IQR.fac"), ...
              ){
         integrand <- function(x, dfun){ x * dfun(x) }
         
@@ -108,10 +108,10 @@
                          fun = "function", 
                          cond = "missing"),
     function(object, fun, useApply = TRUE, 
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ...){
+             IQR.fac = getdistrExOption("IQR.fac"), ...){
 
         if(useApply){
             integrand <- function(x, dfun, fun, ...){ 
@@ -122,7 +122,6 @@
                 fun(x, ...) * dfun(x) 
             }
         }
-
         low0 <- q(object)(lowerTruncQuantile, lower.tail = TRUE) 
         upp0 <- q(object)(upperTruncQuantile, lower.tail = FALSE)
         m <- median(object); s <- IQR(object)
@@ -209,10 +208,10 @@
                          fun = "missing", 
                          cond = "numeric"),
     function(object, cond, useApply = TRUE,
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ...
+             IQR.fac = getdistrExOption("IQR.fac"), ...
              ){
         fct <- function(x, dfun, cond){ x * dfun(x, cond) }
         if(useApply){
@@ -269,10 +268,10 @@
                          fun = "function", 
                          cond = "numeric"),
     function(object, fun, cond, withCond = FALSE, useApply = TRUE,
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac")
+             IQR.fac = getdistrExOption("IQR.fac")
              , ...){
         if(withCond)
             if(useApply){

Modified: branches/distr-2.1/pkg/distrEx/R/Expectation_LebDec.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/Expectation_LebDec.R	2009-03-18 23:25:32 UTC (rev 416)
+++ branches/distr-2.1/pkg/distrEx/R/Expectation_LebDec.R	2009-03-19 12:22:18 UTC (rev 417)
@@ -3,10 +3,10 @@
 setMethod("E", signature(object = "UnivarLebDecDistribution",
                          fun = "missing",
                          cond = "missing"),
-    function(object, rel.tol= getdistExOption("ErelativeTolerance"), 
+    function(object, rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ...){
+             IQR.fac = getdistrExOption("IQR.fac"), ...){
         I.ac <- E(acPart(object), rel.tol = rel.tol, 
                   lowerTruncQuantile = lowerTruncQuantile,
                   upperTruncQuantile = upperTruncQuantile,
@@ -17,10 +17,10 @@
 setMethod("E", signature(object = "UnivarLebDecDistribution",
                          fun = "function",
                          cond = "missing"),
-    function(object, fun, useApply = TRUE, rel.tol= getdistExOption("ErelativeTolerance"), 
+    function(object, fun, useApply = TRUE, rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ... ){
+             IQR.fac = getdistrExOption("IQR.fac"), ... ){
         I.ac <- E(acPart(object), fun = fun, useApply = useApply, rel.tol = rel.tol, 
                   lowerTruncQuantile = lowerTruncQuantile,
                   upperTruncQuantile = upperTruncQuantile,
@@ -31,10 +31,10 @@
 setMethod("E", signature(object = "UnivarLebDecDistribution",
                          fun = "missing",
                          cond = "ANY"),
-    function(object, cond, rel.tol= getdistExOption("ErelativeTolerance"), 
+    function(object, cond, rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ... ){
+             IQR.fac = getdistrExOption("IQR.fac"), ... ){
         I.ac <- E(acPart(object), cond = cond, rel.tol = rel.tol, 
                   lowerTruncQuantile = lowerTruncQuantile,
                   upperTruncQuantile = upperTruncQuantile,
@@ -46,10 +46,10 @@
 setMethod("E", signature(object = "UnivarLebDecDistribution",
                          fun = "function",
                          cond = "ANY"),
-    function(object, fun, cond, useApply = TRUE, rel.tol= getdistExOption("ErelativeTolerance"), 
+    function(object, fun, cond, useApply = TRUE, rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ... ){
+             IQR.fac = getdistrExOption("IQR.fac"), ... ){
         I.ac <- E(acPart(object), fun = fun, cond = cond, useApply = useApply, 
                   rel.tol = rel.tol, 
                   lowerTruncQuantile = lowerTruncQuantile,
@@ -70,10 +70,10 @@
 setMethod("E", signature(object = "AcDcLcDistribution",
                          fun = "ANY",
                          cond = "ANY"),
-    function(object, fun, cond, rel.tol= getdistExOption("ErelativeTolerance"), 
+    function(object, fun, cond, rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ... ){
+             IQR.fac = getdistrExOption("IQR.fac"), ... ){
         object <- distr:::.ULC.cast(object)
         I.ac <- E(acPart(object), fun = fun, cond = cond, rel.tol = rel.tol, 
                   lowerTruncQuantile = lowerTruncQuantile,

Modified: branches/distr-2.1/pkg/distrEx/chm/E.html
===================================================================
--- branches/distr-2.1/pkg/distrEx/chm/E.html	2009-03-18 23:25:32 UTC (rev 416)
+++ branches/distr-2.1/pkg/distrEx/chm/E.html	2009-03-19 12:22:18 UTC (rev 417)
@@ -87,10 +87,10 @@
 ## S4 method for signature 'AbscontDistribution, function,
 ##   missing':
 E(object, fun,  useApply = TRUE,
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ...)
+             IQR.fac = getdistrExOption("IQR.fac"), ...)
 
 ## S4 method for signature 'DiscreteDistribution, function,
 ##   missing':
@@ -119,10 +119,10 @@
 ## S4 method for signature 'AbscontCondDistribution,
 ##   missing, numeric':
 E(object, cond, useApply = TRUE,
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ...)
+             IQR.fac = getdistrExOption("IQR.fac"), ...)
 
 ## S4 method for signature 'DiscreteCondDistribution,
 ##   missing, numeric':
@@ -138,10 +138,10 @@
 ##   function, numeric':
 E(object, fun, cond, 
                withCond = FALSE, useApply = TRUE,
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac")
+             IQR.fac = getdistrExOption("IQR.fac")
              , ...)
 
 ## S4 method for signature 'DiscreteCondDistribution,
@@ -157,38 +157,38 @@
 ## S4 method for signature 'UnivarLebDecDistribution,
 ##   missing, missing':
 E(object,  
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ... )
+             IQR.fac = getdistrExOption("IQR.fac"), ... )
 ## S4 method for signature 'UnivarLebDecDistribution,
 ##   function, missing':
 E(object, fun, 
-             useApply = TRUE, rel.tol= getdistExOption("ErelativeTolerance"), 
+             useApply = TRUE, rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ... )
+             IQR.fac = getdistrExOption("IQR.fac"), ... )
 ## S4 method for signature 'UnivarLebDecDistribution,
 ##   missing, ANY':
 E(object, cond, 
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ... )
+             IQR.fac = getdistrExOption("IQR.fac"), ... )
 ## S4 method for signature 'UnivarLebDecDistribution,
 ##   function, ANY':
 E(object, fun, cond, 
-             useApply = TRUE, rel.tol= getdistExOption("ErelativeTolerance"), 
+             useApply = TRUE, rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ... )
+             IQR.fac = getdistrExOption("IQR.fac"), ... )
 
 ## S4 method for signature 'AcDcLcDistribution, ANY, ANY':
 E(object, fun, cond, 
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ... )
+             IQR.fac = getdistrExOption("IQR.fac"), ... )
 ## S4 method for signature 'CompoundDistribution, missing,
 ##   missing':
 E(object, ...)

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

Modified: branches/distr-2.1/pkg/distrEx/man/E.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/E.Rd	2009-03-18 23:25:32 UTC (rev 416)
+++ branches/distr-2.1/pkg/distrEx/man/E.Rd	2009-03-19 12:22:18 UTC (rev 417)
@@ -64,10 +64,10 @@
 \S4method{E}{UnivariateDistribution,function,missing}(object, fun, useApply = TRUE, Nsim = getdistrExOption("MCIterations"), ...)
 
 \S4method{E}{AbscontDistribution,function,missing}(object, fun,  useApply = TRUE,
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ...)
+             IQR.fac = getdistrExOption("IQR.fac"), ...)
 
 \S4method{E}{DiscreteDistribution,function,missing}(object, fun, useApply = TRUE, ...)
 
@@ -82,10 +82,10 @@
 \S4method{E}{DiscreteMVDistribution,function,missing}(object, fun, useApply = TRUE, ...)
 
 \S4method{E}{AbscontCondDistribution,missing,numeric}(object, cond, useApply = TRUE,
-             rel.tol= getdistExOption("ErelativeTolerance"), 
+             rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrOption("IQR.fac"), ...)
+             IQR.fac = getdistrExOption("IQR.fac"), ...)
 
 \S4method{E}{DiscreteCondDistribution,missing,numeric}(object, cond, useApply = TRUE)
 
[TRUNCATED]

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


More information about the Distr-commits mailing list