[Distr-commits] r1389 - in pkg/distrTeach: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Nov 12 22:48:36 CET 2022
Author: ruckdeschel
Date: 2022-11-12 22:48:35 +0100 (Sat, 12 Nov 2022)
New Revision: 1389
Modified:
pkg/distrTeach/DESCRIPTION
pkg/distrTeach/R/illustCLT.R
pkg/distrTeach/inst/NEWS
pkg/distrTeach/man/0distrTeach-package.Rd
pkg/distrTeach/man/plotCLT.Rd
Log:
[distrTeach] trunk: 2.9.0 ready for release (ported from devel branch, with new plot method)
Modified: pkg/distrTeach/DESCRIPTION
===================================================================
--- pkg/distrTeach/DESCRIPTION 2022-11-12 21:45:41 UTC (rev 1388)
+++ pkg/distrTeach/DESCRIPTION 2022-11-12 21:48:35 UTC (rev 1389)
@@ -1,17 +1,17 @@
Package: distrTeach
-Version: 2.8.1
-Date: 2022-04-22
+Version: 2.9.0
+Date: 2022-11-12
Title: Extensions of Package 'distr' for Teaching Stochastics/Statistics in Secondary School
Description: Provides flexible examples of LLN and CLT for teaching purposes in secondary
- school.
+ school.
Depends: R(>= 3.4), methods, distr(>= 2.2), distrEx(>= 2.2)
Suggests: tcltk
Imports: startupmsg, grDevices, graphics, stats
Authors at R: c(person("Eleonora", "Feist", role="ctb", comment = "contributed as student in the
- initial phase --2008"), person("Matthias", "Kohl", role=c("aut", "cph")),
- person("Peter", "Ruckdeschel", role=c("cre", "cph"),
- email="peter.ruckdeschel at uni-oldenburg.de"), person("Anja", "Hueller", role="ctb",
- comment = "contributed as student in the initial phase --2008"))
+ initial phase --2008"), person("Matthias", "Kohl", role=c("aut", "cph")),
+ person("Peter", "Ruckdeschel", role=c("cre", "cph"),
+ email="peter.ruckdeschel at uni-oldenburg.de"), person("Anja", "Hueller", role="ctb",
+ comment = "contributed as student in the initial phase --2008"))
ByteCompile: yes
License: LGPL-3
Encoding: latin1
@@ -19,4 +19,4 @@
Packaged: Fri Jun 8 00:12:57 2007; Peter
LastChangedDate: {$LastChangedDate$}
LastChangedRevision: {$LastChangedRevision$}
-VCS/SVNRevision: 1319
+VCS/SVNRevision: 1380
Modified: pkg/distrTeach/R/illustCLT.R
===================================================================
--- pkg/distrTeach/R/illustCLT.R 2022-11-12 21:45:41 UTC (rev 1388)
+++ pkg/distrTeach/R/illustCLT.R 2022-11-12 21:48:35 UTC (rev 1389)
@@ -121,4 +121,28 @@
par(mfrow = c(1,1), mar=oldmar)
})
+setMethod("plotCLT","UnivariateDistribution", function(Tn,k, summands = "") {
+ N <- Norm()
+ x <- seq(-5,5,0.01)
+ oldmar <- par("mar",no.readonly = TRUE)
+ par(mfrow = c(1,1), mar = c(5.1,4.1,4.,2.1))
+ pn <- p(Tn)(x)
+ pN <- p(N)(x)
+ plot(x, pn, ylim = c(0, 1), type = "l",
+ ylab = gettext("cdfs"), main="",
+ lwd = 4)
+ title(paste("Sample size", k),line=0.6)
+ lines(x, pN, col = "orange", lwd = 2)
+ kd <- round(max(abs(pn-pN)),4)
+ text(1, 0.2, gettextf("Kolmogoroff-\nDistance:\n%1.4f",kd),
+ adj = 0, cex = 0.8)
+ legend("topleft", # x = -4.5, y = 1.,
+ legend = c(expression(italic(L)(frac(S[n]-E(S[n]),
+ sd(S[n])))), expression(italic(N)(0,1))),
+ cex = .8, bty = "n", col = c("black", "orange"),
+ lwd = c(4,2))
+ par(mfrow = c(1,1), mar=oldmar)
+ })
+
+
Modified: pkg/distrTeach/inst/NEWS
===================================================================
--- pkg/distrTeach/inst/NEWS 2022-11-12 21:45:41 UTC (rev 1388)
+++ pkg/distrTeach/inst/NEWS 2022-11-12 21:48:35 UTC (rev 1389)
@@ -8,13 +8,17 @@
information)
##############
-v 2.8.1
+v 2.9.0
##############
-+ removed our coauthor Anja Hueller's mail address from the package help page,
- as this address was no longer valid
-+ fixed some broken URLs and changed URLs from http to https where possible
+user-visible CHANGES:
++ new S4 method for plotting summand distributions of class
+ "UnivariateDistribution" (i.e., covering, e.g., mixtures
+ of discrete and abs. cont distributions) -> then only
+ the cdfs for different numbers of summands are plotted
+
+
##############
v 2.8
##############
@@ -21,6 +25,9 @@
user-visible CHANGES:
+ DESCRIPTION tag SVNRevision changed to VCS/SVNRevision
++ removed our coauthor Anja Hueller's mail address from the package help page,
+ as this address was no longer valid
++ fixed some broken URLs and changed URLs from http to https where possible
##############
v 2.7
Modified: pkg/distrTeach/man/0distrTeach-package.Rd
===================================================================
--- pkg/distrTeach/man/0distrTeach-package.Rd 2022-11-12 21:45:41 UTC (rev 1388)
+++ pkg/distrTeach/man/0distrTeach-package.Rd 2022-11-12 21:48:35 UTC (rev 1389)
@@ -16,26 +16,23 @@
}
as well as a Tcl/Tk based demo for\code{illustrateCLT}
}
-
\details{
\tabular{ll}{
Package: \tab distrTeach \cr
-Version: \tab 2.8.1 \cr
-Date: \tab 2022-04-22 \cr
+Version: \tab 2.9.0 \cr
+Date: \tab 2022-11-12 \cr
Depends: \tab R(>= 3.4), methods, distr(>= 2.2), distrEx(>= 2.2) \cr
-Suggests: \tab tcltk\cr
-Imports: \tab startupmsg, grDevices, graphics, stats\cr
+Suggests: \tab tcltk \cr
+Imports: \tab startupmsg, grDevices, graphics, stats \cr
LazyLoad: \tab yes \cr
License: \tab LGPL-3 \cr
URL: \tab http://distr.r-forge.r-project.org/\cr
-VCS/SVNRevision: \tab 1319 \cr
+VCS/SVNRevision: \tab 1380 \cr
}
}
\section{Classes}{
\preformatted{
-
Teaching Classes
-
}
}
%\section{Functions}{
@@ -50,31 +47,24 @@
%}}
\section{Methods}{
\preformatted{
-
illustration:
illustrateLLT function for the generation of LLN - visualizations
illustrateCLT function for the generation of CLT - visualizations
plotCLT Generic function for the plotting of CLT-approximations
-
}
}
-
\section{Demos}{
Demos are available --- see \code{demo(package="distrTeach")}.}
-
\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")}.
@@ -84,7 +74,6 @@
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
@@ -91,13 +80,11 @@
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 uni-oldenburg.de},\cr
Eleonara Feist \email{eleonoragerber at gmx.de}, and, \cr
Anja Hueller \cr
-
\emph{Maintainer:} Peter Ruckdeschel \email{peter.ruckdeschel at uni-oldenburg.de}
}
\references{
@@ -104,17 +91,16 @@
P. Ruckdeschel, M. Kohl, T. Stabla, F. Camphausen (2006):
S4 Classes for Distributions, \emph{R News}, \emph{6}(2), 2-6.
\url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf}
-
%a more detailed manual for \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst}, and \pkg{distrTeach} 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},
+a vignette for packages \pkg{distr}, \pkg{distrSim}, \pkg{distrTEst},
+
+
+
and \pkg{distrTeach} 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{https://distr.r-forge.r-project.org/} and the pages ...
-
M. Kohl (2005): \emph{Numerical Contributions to the Asymptotic
Theory of Robustness.} PhD Thesis. Bayreuth. Available as
\url{https://www.stamats.de/wp-content/uploads/2018/04/ThesisMKohl.pdf}
Modified: pkg/distrTeach/man/plotCLT.Rd
===================================================================
--- pkg/distrTeach/man/plotCLT.Rd 2022-11-12 21:45:41 UTC (rev 1388)
+++ pkg/distrTeach/man/plotCLT.Rd 2022-11-12 21:48:35 UTC (rev 1389)
@@ -3,6 +3,7 @@
\alias{plotCLT-methods}
\alias{plotCLT,AbscontDistribution-method}
\alias{plotCLT,DiscreteDistribution-method}
+\alias{plotCLT,UnivariateDistribution-method}
\title{Generic Plot Function for Illustrating the CLT}
\description{Generic 'plot' function for generating the plots of 'illustrateCLT'.}
@@ -10,6 +11,7 @@
\usage{plotCLT(Tn, ...)
\S4method{plotCLT}{AbscontDistribution}(Tn, k, summands="")
\S4method{plotCLT}{DiscreteDistribution}(Tn, k, summands="")
+\S4method{plotCLT}{UnivariateDistribution}(Tn, k, summands="")
}
\arguments{
\item{Tn}{object of class \code{"AbscontDistribution"} or class
More information about the Distr-commits
mailing list