# [Distr-commits] r753 - in pkg/distr: . inst vignettes

Fri Nov 18 12:48:06 CET 2011

Author: ruckdeschel
Date: 2011-11-18 12:48:06 +0100 (Fri, 18 Nov 2011)
New Revision: 753

pkg/distr/vignettes/
pkg/distr/vignettes/newDistributions.Rnw
pkg/distr/vignettes/svn-multi.sty
pkg/distr/vignettes/svnkw.sty
Removed:
pkg/distr/inst/doc/
Modified:
pkg/distr/DESCRIPTION
Log:
[distr] (trunk)
reaction to http://developer.r-project.org/214update.txt
+ created folder vignettes and moved content of inst/doc/ to it
+ removed lazyload tag in DESCRIPTION
+ updated version number in DESCRIPTION
+ updated affiliation info in newDistributions.Rnw
+ deleted inst/doc folder

Modified: pkg/distr/DESCRIPTION
===================================================================
--- pkg/distr/DESCRIPTION	2011-11-18 11:41:21 UTC (rev 752)
+++ pkg/distr/DESCRIPTION	2011-11-18 11:48:06 UTC (rev 753)
@@ -1,6 +1,6 @@
Package: distr
-Version: 2.3.3
-Date: 2011-09-30
+Version: 2.3.4
+Date: 2011-11-18
Title: Object oriented implementation of distributions
Description: S4 Classes and Methods for distributions
Author: Florian Camphausen, Matthias Kohl, Peter Ruckdeschel, Thomas Stabla
@@ -8,11 +8,10 @@
Depends: R(>= 2.2.0), methods, graphics, startupmsg, sfsmisc, SweaveListingUtils
Suggests: distrEx, SweaveListingUtils
Imports: stats
ByteCompile: yes
Encoding: latin1
URL: http://distr.r-forge.r-project.org/
LastChangedDate: {$LastChangedDate$}
LastChangedRevision: {$LastChangedRevision$}
-SVNRevision: 741
+SVNRevision: 754

Copied: pkg/distr/vignettes/newDistributions.Rnw (from rev 742, pkg/distr/inst/doc/newDistributions.Rnw)
===================================================================
--- pkg/distr/vignettes/newDistributions.Rnw	                        (rev 0)
+++ pkg/distr/vignettes/newDistributions.Rnw	2011-11-18 11:48:06 UTC (rev 753)
@@ -0,0 +1,412 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Vignette  "How to generate new distributions in packages distr, distrEx"
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%\VignetteIndexEntry{newDistributions}
+%\VignetteDepends{startupmsg}
+%\VignetteKeywords{probability distribution,estimation}
+%\VignettePackage{distr}
+%
+%
+%
+\documentclass[10pt]{article}
+%
+%use svn-multi to fill in revision information
+%
+\usepackage{svn-multi}
+% Version control information:
+\svnidlong
+{$HeadURL$}
+{$LastChangedDate$}
+{$LastChangedRevision$}
+{$LastChangedBy$}
+%\svnid{$Id: example_main.tex 146 2008-12-03 13:29:19Z martin$}
+% Don't forget to set the svn property 'svn:keywords' to
+% 'HeadURL LastChangedDate LastChangedRevision LastChangedBy' or
+% 'Id' or both depending if you use \svnidlong and/or \svnid
+%
+\newcommand{\svnfooter}{Last Changed Rev: \svnkw{LastChangedRevision}}
+\svnRegisterAuthor{ruckdeschel}{Peter Ruckdeschel}
+\svnRegisterAuthor{stamats}{Matthias Kohl}
+\svnRegisterAuthor{florian}{Florian Camphausen}
+\svnRegisterAuthor{stabla}{Thomas Stabla}
+\svnRegisterAuthor{anhuel}{Anja H{\"u}ller}
+\svnRegisterAuthor{ifrin}{Eleonara Feist}
+\svnRegisterAuthor{jdospina}{Juan David Ospina}
+\svnRegisterAuthor{kowzar}{Kouros Owzar}
+%
+\usepackage{geometry}
+%
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0.0,0.0,0.75}
+\definecolor{distrCol}{rgb}{0.0,0.4,0.4}
+%
+\usepackage{ifpdf}
+%
+\usepackage{url}
+\usepackage{amssymb}
+\usepackage[%
+baseurl={r-forge.r-project.org},%
+pdftitle={How to generate new distributions in packages distr, distrEx},%
+pdfauthor={Peter Ruckdeschel, Matthias Kohl},%
+pdfsubject={distr},%
+pdfkeywords={probability distribution,simulation,estimation},%
+%
+\markboth{\sl How to generate new distributions in packages {\tt distr}'', {\tt distrEx}''}%
+{\sl How to generate new distributions in packages {\tt distr}'', {\tt distrEx}''}
+%
+% -------------------------------------------------------------------------------
+\newcommand{\Reals}{\mathbb{R}}
+\newcommand{\R}{\mathbb{R}}
+\newcommand{\N}{\mathbb{N}}
+%
+% -------------------------------------------------------------------------------
+\RequirePackage{fancyvrb}
+\RequirePackage{listings}
+%\usepackage{Sweave} no longer needed
+% -------------------------------------------------------------------------------
+\SweaveOpts{keep.source=TRUE}
+% -------------------------------------------------------------------------------
+<<SweaveListingsPreparations, results=tex, echo=FALSE>>=
+require(SweaveListingUtils)
+SweaveListingPreparations()
+setToBeDefinedPkgs(pkgs = c("distr","distrEx"),
+                   keywordstyles = "\\bf\\color{distrCol}")
+@
+% -------------------------------------------------------------------------------
+%
+% -------------------------------------------------------------------------------
+\begin{document}
+% -------------------------------------------------------------------------------
+\title{How to generate new distributions in packages \pkg{distr}, \pkg{distrEx}}
+%,version \pkgExversion}
+\author{\small Peter Ruckdeschel\thanks{Fraunhofer ITWM, Kaiserslautern}
+\\[-.5ex]
+\small Matthias Kohl\thanks{FH Furtwangen}
+\smallskip\\
+\small Fraunhofer ITWM\\[-.5ex]
+\small Fraunhofer Platz 1\\[-.5ex]
+\small 67663 Kaiserslautern\\[-.5ex]
+\small Germany\\
+\small e-Mail: {\small \tt Peter.Ruckdeschel at itwm.fraunhofer.de}\medskip\\
+\parbox[t]{5cm}{
+\footnotesize\sffamily
+ Version control information:
+\begin{tabbing}
+\footnotesize\sffamily
+ Last changes revision: \= \kill
+ Last changed date: \> \svndate\\
+ Last changes revision: \> \svnrev\\
+ Version: \> \svnFullRevision*{\svnrev}\\
+ Last changed by: \> \svnFullAuthor*{\svnauthor}\\
+\end{tabbing}
+}}
+
+\maketitle
+% -------------------------------------------------------------------------------
+\begin{abstract}
+% -------------------------------------------------------------------------------
+In this vignette, we give short examples how to produce new
+distributions in packages \pkg{distr} and \pkg{distrEx}.
+This vignette refers to package version~\pkgversion.
+% -------------------------------------------------------------------------------
+\end{abstract}
+% -------------------------------------------------------------------------------
+Basically there are three ways to produce new
+distributions in packages \pkg{distr} and \pkg{distrEx}:
+\begin{enumerate}
+\item automatic generation of single distribution objects by arithmetics and the like
+\item using generating functions to produce single distribution objects
+\item defining new distribution classes / doing it from scratch
+\end{enumerate}
+We will give short examples of all three of them.
+% -------------------------------------------------------------------------------
+\section{Automatic generation by arithmetics and the like}
+% -------------------------------------------------------------------------------
+We have made available quite general arithmetical operations to our distribution
+objects, generating new image distribution objects automatically. As an example, try
+<<Prepa, echo=false, results=tex>>=
+## preparation: set option withSweave to true
+require(distr)
+distroptions(withSweave = TRUE)
+options(width=70)
+@
+%
+<<exam1, eval = TRUE, fig = TRUE>>=
+require(distr)
+N <- Norm(mean = 2, sd = 1.3)
+P <- Pois(lambda = 1.2)
+Z <- 2*N + 3 + P
+Z
+plot(Z, panel.first = grid(), lwd=2)
+p(Z)(0.4)
+q(Z)(0.3)
+Zs <- r(Z)(50)
+Zs
+@
+\par
+\noindent{\bf Comment:}\\
+Let \code{N} an object of class \code{"Norm"} with parameters  \code{mean=2},
+\code{sd=1.3} and let \code{P}  an object of class \code{"Pois"} with parameter
+\code{lambda=1.2}. Assigning to \code{Z} the expression \code{2*N+3+P}, a
+new distribution object is generated ---of class \code{"AbscontDistribution"} in
+our case--- so that identifying \code{N}, \code{P}, \code{Z} with random
+variables distributed according to {\tt N}, {\tt P}, {\tt Z},
+${\cal L}({\tt Z})={\cal L}(2*{\tt N}+3+{\tt P})$,  and writing \code{p(Z)(0.4)}
+we get $P(Z\leq 0.4)$, \code{ q(Z)(0.3)}  the $30\%$-quantile of {\tt Z},
+and with \code{r(Z)(50)} we generate $50$ pseudo random numbers distributed
+according to {\tt Z}, while the \code{plot} command generates the above figure.\\
+
+There a caveats to take care about; for details refer to the (larger) vignette
+{\tt distr} in package \pkg{distrDoc}.
+% -------------------------------------------------------------------------------
+\section{Using generating functions}
+% -------------------------------------------------------------------------------
+If you want to generate a single distribution object (without any particular parameter)
+generating functions are the method of choice:\\
+
+
+Objects of classes \code{LatticeDistribution} resp.\
+\code{DiscreteDistribution},
+\code{AbscontDistribution},  may be generated using the generating functions
+\code{LatticeDistribution()} resp.\ \code{DiscreteDistribution()}
+the corresponding help.\\
+
+E.g., to produce a discrete distribution with
+support $(1,5,7,21)$ with corresponding probabilities $(0.1,0.1,0.6,0.2)$
+we may write
+<<DiscrDist, eval = TRUE, fig = TRUE>>=
+D <- DiscreteDistribution(supp = c(1,5,7,21), prob = c(0.1,0.1,0.6,0.2))
+D
+plot(D, panel.first = grid(), lwd = 2)
+@
+%
+\newline
+and to generate an absolutely continuos distribution with density proportional
+to $e^{-|x|^3}$, we write
+<<AbscDist, eval = TRUE, fig = TRUE>>=
+AC <- AbscontDistribution(d = function(x) exp(-abs(x)^3), withStand = TRUE)
+AC
+plot(AC, panel.first = grid(), lwd = 2)
+@
+%
+% -------------------------------------------------------------------------------
+\section{Doing it from scratch}
+% -------------------------------------------------------------------------------
+If you would like to create new parametric distributions, using already
+implemented {\tt r}, {\tt d}, {\tt p}, and {\tt q} functions
+(e.g.\ implementing additional distributions realized in another
+\href{http://cran.r-project.org}{\tt CRAN} package),
+you should probably envisage introducing new distribution {\tt S4} (sub-)classes
+and hence better look at the implementation of some discrete and
+continuous parametric distribution classes in package \pkg{distr}.
+
+\noindent{\small Hint: download the {\tt .tar.gz} file; extract it to some {\tt temp}
+folder; look at subdirectories {\tt R} and {\tt man}}\smallskip\\
+
+The general procedure is as follows
+
+\begin{enumerate}
+\item introduce a  new subclass of  class \code{Parameter}
+\item introduce a new subclass of  \code{LatticeDistribution}/%
+\code{DiscreteDistribution} (if discrete)
+ or of class \code{AbscontDistribution} (if continuous).
+\item define accessor and replacement functions for the slots'' of the
+parameter (e.g.\ \code{"size"} and \code{"prob"} in the binomial case),
+possibly with new generics
+\item (possibly) define a validity function
+\item define a generating function
+\item if existing, define particular convolution methods or similar particular
+methods for this new distribution class
+\item create {\tt .Rd} files for the
+\begin{itemize}
+      \item parameter class
+      \item distribution class
+\end{itemize}
+\item if analytic expressions are available, define particular \code{E}-, \code{var}-,
+\code{skewness}-, and \code{kurtosis}-methods
+     and if so, also document\footnote{%
+%
+this is new, because so far, all \code{E}-, \code{var}-,
+\code{skewness}-, and \code{kurtosis}-methods for basic''
+distributions are documented in the \pkg{distrEx} documentation to
+\code{E}, \code{var}, \ldots, but this would not be operational
+any longer for new derived classes, possibly defined in other, new packages
+%
+     } the corresponding methods in
+     the distribution class {\tt .Rd} file\\
+\end{enumerate}
+
+Let's go through the steps in the example case of the Binomial implementation
+in packages \pkg{distr} and \pkg{distrEx}:
+
+\begin{enumerate}
+%
+\item in \pkg{distr}, see source in \file{R/AllClasses.R},
+%
+<<AllClass1, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distr","R","AllClasses.R","distr",
+                     "## Class: BinomParameter", "#-")
+@
+%
+\item in \pkg{distr}, see source in \file{R/AllClasses.R},
+%
+<<AllClass2, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distr","R","AllClasses.R","distr",
+                     from = "## Class: binomial distribution",
+                     to = "contains = \"LatticeDistribution\"",
+                     offset.after = 1)
+@
+%
+\item in \pkg{distr}, see source in \file{R/BinomialDistribution.R},
+%
+<<BinomDist1, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distr","R","BinomialDistribution.R","distr",
+                     from = c("## Access Methods", "## wrapped access methods"),
+                     to = c("setReplaceMethod\$$\"prob\", \"BinomParameter\"", + "size = value\$$\\)") ,
+                     offset.after = c(1,1))
+@
+%
+and \file{R/AllGenerics},
+<<AllGenerics, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distr","R","AllGenerics.R","distr",
+                     from = "if\$$!isGeneric\\(\"size\"", + to = "setGeneric\\(\"prob\"") +@ +% +\item in \pkg{distr}, see source in \file{R/BinomialDistribution.R}, +% +<<BinomDist2, results=tex, echo=FALSE>>= +lstinputSourceFromRForge("distr","R","BinomialDistribution.R","distr", + from = "setValidity\\(\"Binom", + to = "else return\\(TRUE\$$",
+                     offset.after = 1)
+@
+%
+\item in \pkg{distr}, see source in \file{R/BinomialDistribution.R},
+%
+<<BinomDist3, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distr","R","BinomialDistribution.R","distr",
+                     from = "Binom <- function",
+                     to = "Binom <- function")
+@
+%
+\item in \pkg{distr}, see source in \file{R/BinomialDistribution.R},
+%
+<<BinomDist4, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distr","R","BinomialDistribution.R","distr",
+                     from = "## Convolution for",
+                     to = "\\}\\)")
+@
+%
+\item in \pkg{distr}, see sources in
+%
+\begin{itemize}
+%
+\item\file{man/BinomParameter-class.Rd}
+%
+<<BinomParam, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distr","man","BinomParameter-class.Rd","distr")
+@
+%
+\item\file{man/Binom-class.Rd}
+<<Binomclass, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distr","man","Binom-class.Rd","distr")
+@
+%
+\item {\footnotesize you could have: \file{man/Binom.Rd}
+      for the generating function; in the Binomial case, documentation is in
+      \file{Binom-class.Rd}; but in case of the Gumbel distribution,
+      in package \pkg{distrEx}, there is such an extra {\tt .Rd} file}
+%
+\end{itemize}
+%
+\item in \pkg{distrEx}, see sources in
+%
+<<Prepa2, echo=false, results=tex>>=
+## preparation: set option withSweave to true
+require(distrEx)
+@
+%
+\begin{itemize}
+%
+\item\file{Expectation.R},
+<<Expect, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distrEx","R","Expectation.R","distr",
+                     from = "\"E\", signature\$$object = \"Binom\"", + to = "\\}\$$")
+@
+%
+\item\file{Functionals.R},
+<<var, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distrEx","R","Functionals.R","distr",
+                     from = "\"var\", signature\$$x = \"Binom\"", + to = "\\}\$$")
+@
+%
+\item\file{skewness.R},
+<<skew, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distrEx","R","Skewness.R","distr",
+                     from = "\"skewness\", signature\$$x = \"Binom\"", + to = "\\}\$$")
+@
+%
+\item\file{kurtosis.R},
+<<kurt, results=tex, echo=FALSE>>=
+lstinputSourceFromRForge("distrEx","R","Kurtosis.R","distr",
+                     from = "\"kurtosis\", signature\$$x = \"Binom\"", + to = "\\}\$$")
+@
+%
+\end{itemize}
+\end{enumerate}
+The procedure will be similar for \textit{any} new class of distributions.\medskip
+\begin{itemize}
+  \item[Comment] In the classes in package \pkg{distr} (historically the oldest''
+  in the development of this project), we still use \code{initialize} methods;
+  this is no longer needed, if you provide generating functions; for this more
+  recent'' approach, confer the realization of class \code{Gumbel} in package \pkg{distrEx}.
+\end{itemize}
+
+% -------------------------------------------------------------------------------
+\section{Help needed  / collaboration welcome}
+% -------------------------------------------------------------------------------
+You are --- as announced on
+\href{http://distr.r-forge.r-project.org}{\tt http://distr.r-forge.r-project.org} ---
+         very welcome to collaborate in this project!
+See in particular
+\href{http://distr.r-forge.r-project.org/HOWTO-collaborate.txt}%
+{\tt http://distr.r-forge.r-project.org/HOWTO-collaborate.txt}
+
+With this you should be able to start working.
+\begin{thebibliography}{2}
+
+\bibitem{K:R:S:04}
+Kohl M., Ruckdeschel P. and Stabla T.
+\newblock {General Purpose Convolution Algorithm for Distributions in S4-Classes
+by means of FFT}.
+\newblock unpublished manual
+
+
+\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
+
+\end{thebibliography}
+<<cleanup, echo=FALSE>>=
+@
+% -------------------------------------------------------------------------------
+\end{document}
+% -------------------------------------------------------------------------------

Copied: pkg/distr/vignettes/svn-multi.sty (from rev 742, pkg/distr/inst/doc/svn-multi.sty)
===================================================================
--- pkg/distr/vignettes/svn-multi.sty	                        (rev 0)
+++ pkg/distr/vignettes/svn-multi.sty	2011-11-18 11:48:06 UTC (rev 753)
@@ -0,0 +1,1752 @@
+%%
+%% This is file svn-multi.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% svn-multi.dtx  (with options: package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2006-2009 by Martin Scharrer <martin at scharrer-online.de>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status maintained'.
+%%
+%% The Current Maintainer of this work is Martin Scharrer.
+%%
+%% This work consists of the files svn-multi.dtx, svn-multi-pl.dtx, svn-multi.ins
+%% and the derived files svn-multi.sty, svnkw.sty and svn-multi.pl.
+%%
+\makeatletter
+\def\svnmulti at version {v2.1}
+\def\svnmulti at rev  $#1: #2${\def\svnmulti at rev{#2}}
+\def\svnmulti at date $#1: #2-#3-#4 #5${\def\svnmulti at date{#2/#3/#4}}
+\svnmulti at rev  $Rev: 691$\relax
+\svnmulti at date $Date: 2009-03-27 21:37:56 +0000 (Fri, 27 Mar 2009)$\relax
+
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{svn-multi}
+ [\svnmulti at date\space\svnmulti at version\space SVN Keywords for multi-file LaTeX documents]
+
+\RequirePackage{kvoptions}
+
+\SetupKeyvalOptions{%
+  family = svn-multi,
+  prefix = @svnmulti@
+}
+\newif\if at svnmulti@anygraphic
+\newif\if at svnmulti@autokw
+\newif\if at svnmulti@autokwall
+
+\DeclareVoidOption{old}{%
+  \@svnmulti at verbatimtrue
+  \@svnmulti at groupsfalse
+  \@svnmulti at externalfalse
+  \@svnmulti at graphicsfalse
+  \@svnmulti at pgfimagesfalse
+  \@svnmulti at tablefalse
+  \@svnmulti at filehooksfalse
+  \@svnmulti at subgroupsfalse
+}
+\DeclareVoidOption{all}{%
+  \@svnmulti at verbatimtrue
+  \@svnmulti at groupstrue
+  \@svnmulti at externaltrue
+  \@svnmulti at graphicstrue
+  \@svnmulti at pgfimagestrue
+  \@svnmulti at tabletrue
+  \@svnmulti at filehookstrue
+  \@svnmulti at subgroupstrue
+}
+\DeclareBoolOption[true]{verbatim}
+\DeclareBoolOption[false]{groups}
+\DeclareBoolOption[false]{external}
+\DeclareBoolOption[false]{subgroups}
+\DeclareBoolOption[false]{graphics}
+\DeclareBoolOption[false]{pgfimages}
+\DeclareBoolOption[false]{table}
+\DeclareBoolOption[false]{filehooks}
+\DeclareStringOption[false]{autokw}[all]
+
+\ExecuteOptions{old}
+\ProcessKeyvalOptions{svn-multi}
+\def\svn at depoption#1{%
+  \csname if at svnmulti@#1\endcsname\else
+  \message{svn-multi: Required option '#1' enabled.}%
+  \csname @svnmulti@#1true\endcsname
+  \fi
+}
+
+\if at svnmulti@groups
+  \svn at depoption{filehooks}
+\fi
+\if at svnmulti@external
+  \svn at depoption{filehooks}
+\fi
+\if at svnmulti@subgroups
+  \svn at depoption{groups}
+  \svn at depoption{filehooks}
+\fi
+\if at svnmulti@graphics
+  \svn at depoption{external}
+  \svn at depoption{filehooks}
+\fi
+\if at svnmulti@pgfimages
+  \svn at depoption{external}
+  \svn at depoption{filehooks}
+\fi
+  \svn at depoption{external}
+  \svn at depoption{filehooks}
+\fi
+\if at svnmulti@table
+  \svn at depoption{groups}
+  \svn at depoption{filehooks}
+\fi
+\else
+\else
+\def\svn at temp{true}
+  \svn at depoption{external}
+  \svn at depoption{filehooks}
+\else
+\def\svn at temp{false}
+  \fi
+\else
+  \PackageError{svn-multi}%
+     ! Only 'true','false' or empty (='true') are allowed!}
+\fi\fi\fi\fi
+
+\def\svn at temp{true}
+\ifx\@svnmulti at autokw\svn at temp
+  \@svnmulti at autokwtrue
+  \@svnmulti at autokwalltrue
+  \svn at depoption{filehooks}
+\fi
+\def\svn at temp{all}
+\ifx\@svnmulti at autokw\svn at temp
+  \@svnmulti at autokwtrue
+  \@svnmulti at autokwalltrue
+  \svn at depoption{filehooks}
+\fi
+\def\svn at temp{ext}
+\ifx\@svnmulti at autokw\svn at temp
+  \@svnmulti at autokwtrue
+  \@svnmulti at autokwallfalse
+\fi
+\def\svn at temp{false}
+\ifx\@svnmulti at autokw\svn at temp
+  \@svnmulti at autokwfalse
+  \@svnmulti at autokwallfalse
+\fi
+
+\if at svnmulti@graphics
+  \@svnmulti at anygraphictrue
+\fi
+\if at svnmulti@pgfimages
+  \@svnmulti at anygraphictrue
+\fi
+
+\def\svn at ifempty#1{%
+  \begingroup
+  \edef\svn at temp{#1}%
+  \ifx\svn at temp\empty
+    \endgroup
+    \expandafter
+    \@firstoftwo
+  \else
+    \endgroup
+    \expandafter
+    \@secondoftwo
+  \fi
+}
+
+\def\svn at ifequal#1#2{%
+  \begingroup
+  \edef\svn at stringa{#1}%
+  \edef\svn at stringb{#2}%
+  \ifx\svn at stringa\svn at stringb
+    \endgroup
+    \expandafter
+    \@firstoftwo
+  \else
+    \endgroup
+    \expandafter
+    \@secondoftwo
+  \fi
+}
+
+\def\svn at ifvalidrev#1{%
+  \begingroup
+  \@ifundefined{#1}%
+    {\def\svn at temp{-1}}%
+    {\expandafter\edef
+     \expandafter\svn at temp\expandafter{\csname #1\endcsname}}%
+  \ifnum\svn at temp>-1\relax
+    \endgroup
+    \expandafter
+    \@firstoftwo
+  \else
+    \endgroup
+    \expandafter
+    \@secondoftwo
+  \fi
+}
+
+\def\svn at ifeof#1{%
+  \ifeof#1%
+    \expandafter\@firstoftwo
+  \else
+    \expandafter\@secondoftwo
+  \fi
+}
+
+\def\svn at ifonlyone#1{%
+  \expandafter\expandafter\expandafter
+  \svn@@ifonlyone\csname @svng@#1 at files\endcsname,\relax
+}
+
+\def\svn@@ifonlyone#1,#2\relax{%
+  \svn at ifempty{#2}
+}
+
+\def\svn at input#1{%
+  \begingroup
+    \let\svn at rg\svn at g
+    \IfFileExists{#1}{\@@input #1\relax}{}%
+    \global\let\svn at g\svn at rg
+  \endgroup
+}
+
+\def\svn at inputsvx#1{%
+  \svn at pushfilestack
+  \svn at input{#1.svx}%
+  \svn at popfilestack
+}
+
+\def\svnrev{-1}             \def\@svn at rev{-1}
+\def\svndate{}              \def\@svn at date{}
+\def\svnauthor{}            \def\@svn at author{}
+\def\svnyear{0000}          \def\@svn at year{0000}
+\def\svnmonth{00}           \def\@svn at month{00}
+\def\svnday{00}             \def\@svn at day{00}
+\def\svnhour{00}            \def\@svn at hour{00}
+\def\svnminute{00}          \def\@svn at minute{00}
+\def\svnsecond{00}          \def\@svn at second{00}
+\def\svntimezonehour{+00}   \def\@svn at timezonehour{+00}
+\def\svntimezoneminute{00}  \def\@svn at timezoneminute{00}
+\def\svnmainurl{NOT SET}    \def\svnmainfilename{NOT SET}
+\def\svnurl{} \def\svnfname{}
+\def\svn at temp{}
+
+\def\svn at pg{} \def\svn at g{} \def\svn at cg{\svn at g} \def\svn at rg{\svn at pg}
+\let\@svng@@files\relax
+
+\def\svn at initfile{%
+  \gdef\svnfilerev{-1}%
+  \gdef\svnfiledate{}%
+  \gdef\svnfileauthor{}%
+  \gdef\svnfileyear{0000}%
+  \gdef\svnfilemonth{00}%
+  \gdef\svnfileday{00}%
+  \gdef\svnfilehour{00}%
+  \gdef\svnfileminute{00}%
+  \gdef\svnfilesecond{00}%
+  \gdef\svnfiletimezonehour{+00}%
+  \gdef\svnfiletimezoneminute{00}%
+  \gdef\svnfileurl{}%
+  \gdef\svnfilefname{}%
+  \gdef\svnfiledir{}%
+}
+\svn at initfile
+
+
+\begingroup
+\@makeother\^^L
+\if at svnmulti@autokw
+\gdef\svne at ff{^^L}
+\fi
+\endgroup
+
+\if at svnmulti@autokw
+
+\newcommand*{\svne at catcodes}{%
+  \let\do\@makeother
+  \endlinechar=-1
+  \dospecials
+  \do\- \do\: \do\. \do\^^L
+}
+
+    \def#1{}%
+  \else
+  \fi
+}
+
+\def\svne at gobblerest{%
+    \let\next\relax
+  \else
+    \ifx\svn at temp\svne at ff
+      \let\next\relax
+    \else
+      \let\next\svne at gobblerest
+    \fi
+  \fi
+  \next
+}
+
+}
+
+\newcommand*{\svne at parseentriesfile}{%
+  \begingroup
+    \let\next\relax
+      \svne at readline\svne at version
+      \ifnum\svne at version>7\relax
+          \svne at catcodes
+          \svne at readline\svne at version
+          \ifnum\svne at version>7\relax
+            \def\next{\svne at parsedirentry%
+                      \svne at parseentries}
+          \else
+          \fi
+        \fi
+      \fi
+    \fi
+    \next
+  \endgroup
+}
+
+\newcommand*{\svne at parsedirentry}{%
+  \svne at readline\svne at name
+  \svne at readline\svne at kind
+  \svn at ifempty{\svne at name}%
+    {\svn at ifequal{\svne at kind}{dir}%
+      {%
+        {\svne at readline\svn at temp}%
+        \svne at readline\svne at baseurl
+        \svne at gobblerest
+      }{}%
+    }{}%
+}
+
+\begingroup
+
+\@makeother\-
+\@makeother\:
+\@makeother\.
+
+\gdef\svne at scandate#1{%
+  \expandafter\svne at scandate@#1\relax
+  0000-00-00T00:00:00.00000Z\relax\relax
+}
+
+\gdef\svne at scandate@#1-#2-#3T#4:#5:#6.#7\relax#8\relax{%
+  \gdef\svnfileyear{#1}%
+  \gdef\svnfilemonth{#2}%
+  \gdef\svnfileday{#3}%
+  \gdef\svnfilehour{#4}%
+  \gdef\svnfileminute{#5}%
+  \gdef\svnfilesecond{#6}%
+  \gdef\svnfiletimezonehour{+00}%
+  \gdef\svnfiletimezoneminute{00}%
+  \gdef\svnfiledate{#1-#2-#3 #4:#5:#6Z}%
+  \def\svne at date{#1-#2-#3 #4:#5:#6Z}%
+}
+
+\endgroup
+
+\newcommand*{\svne at parseentries}{%
+  \svn at ifeof{\svne at read}%
+  {}%
+  {%
+    \svne at readline\svne at name
+    \@onelevel at sanitize\svne at name
+    \svn at ifeof{\svne at read}%
+    {}%
+    {%
+    \svne at readline\svne at kind
+    \svn at ifequal{\svne at kind}{file}%
+      {%
+      \svne at readline\svn at temp
+      \svne at readline\svn at temp
+      \svne at readline\svn at temp
+      \svne at readline\svn at temp
+      \svne at readline\svn at temp
+      \svne at readline\svn at temp
+      \svne at readline\svne at date
+      \svne at readline\svne at rev
+      \svne at readline\svne at author
+      %\@onelevel at sanitize\svne at date
+      \svne at scandate{\svne at date}%
+      \edef\svne at url{\svne at baseurl/\svne at name}%
+      \svne at handleentry
+      }{}%
+    \svne at gobblerest
+    \svne at parseentries
+    }%
+  }%
+}
+
+\def\svne at handleentry{%
+  \svn at ifequal{\svne at name}{\svnfilefname}%
+    {%
+      \svnkwdef{Filename}{\svne at name}%
+      \svnkwdef{Date}{\svne at date}%
+      \svnkwdef{Revision}{\svne at rev}%
+      \svnkwdef{Author}{\svne at author}%
+      \@svn at updateid{\svne at rev}{\svne at date}{\svne at author}{\svne at url}%
+    }{}%
+}%
+
+\def\svnegetfile#1{%
+  \begingroup
+    \svn at getfilename{#1}%
+    \edef\svnfilefname{\svnfilefname}%
+    \@onelevel at sanitize\svnfilefname
+    \svne at parseentriesfile{\svnfiledir .svn/}%
+    \svne at parseentriesfile{\svnfiledir _svn/}%
+  \endgroup
+}
+
+\if at svnmulti@autokwall
+\AtBeginDocument{%
+    \svnegetfile{\jobname.\svn at mainext}%
+}
+\fi
+
+\fi
+
+\def\svntimezone{\svntimezonehour\svntimezoneminute\svn at gobblezeros}
+\def\svnfiletimezone{\svnfiletimezonehour\svnfiletimezoneminute\svn at gobblezeros}
+\def\svncgtimezone{\svncgtimezonehour\svncgtimezoneminute}
+
+\def\svn at gobblezeros{%
+  \futurelet\svn at nextchar\svn at gobblezeros@
+}
+\def\svn at gobblezeros@{%
+  \let\@tempa=\relax
+  \def\@tempb{0}%
+  \ifx0\svn at nextchar
+    \let\@tempa=\@gobbletwo
+  \fi
+  \@tempa
+}
+
+\def\svntime{\svnhour:\svnminute:\svnsecond}
+\def\svnfiletime{\svnfilehour:\svnfileminute:\svnfilesecond}
+\def\svncgtime{\svncghour:\svncgminute:\svncgsecond}
+
+\newcommand*{\svntoday}{%
+  \begingroup
+    \year\svnyear \month\svnmonth \day\svnday
+    \relax \today
+  \endgroup
+}
+\newcommand*{\svnfiletoday}{%
+  \begingroup
+    \year\svnfileyear \month\svnfilemonth \day\svnfileday
+    \relax \today
+  \endgroup
+}
+\newcommand*{\svncgtoday}{%
+  \@ifundefined{svng@\svn at cg @year}{??}{%
+    \begingroup
+      \year\svncgyear \month\svncgmonth \day\svncgday
+      \relax \today
+    \endgroup
+  }%
+}%
+
+\newcommand*{\svnid}{%
+  \@svnidswtrue
+  \svnkwsave
+}
+\newif\if at svnidsw
+\@svnidswfalse
+
+\def\svn at scanId#1 #2 #3 #4 #5\relax{%
+  \@svn at scandate{#3 #4}%
+  \@svn at updateid{#2}{#3 #4}{#5}{#1}%
+  \svnkwdef{Filename}{#1}%
+  \svnkwdef{Date}{#3 #4}%
+  \svnkwdef{Revision}{#2}%
+  \svnkwdef{Author}{#5}%
+}
+
+\def\@svn at updateid#1#2#3#4{%
+  \xdef\svnfilerev{#1}%
+  \xdef\svnfiledate{#2}%
+  \xdef\svnfileauthor{#3}%
+  \xdef\svnfileurl{#4}%
+  \svn at getfilename\svnfileurl%
+  \ifx\svnfilerev\empty\else
+    \ifnum\@svn at rev<\svnfilerev
+      \xdef\@svn at rev{\svnfilerev}%
+      \xdef\@svn at date{\svnfiledate}%
+      \xdef\@svn at author{\svnfileauthor}%
+      \xdef\@svn at year{\svnfileyear}%
+      \xdef\@svn at month{\svnfilemonth}%
+      \xdef\@svn at day{\svnfileday}%
+      \xdef\@svn at hour{\svnfilehour}%
+      \xdef\@svn at minute{\svnfileminute}%
+      \xdef\@svn at second{\svnfilesecond}%
+      \xdef\@svn at timezonehour{\svnfiletimezonehour}%
+      \xdef\@svn at timezoneminute{\svnfiletimezoneminute}%
+      \xdef\@svn at url{\svnfileurl}%
+      \xdef\@svn at fname{\svnfilefname}%
+    \fi
+
+    \if at svnmulti@groups
+      \ifx\svn at g\empty\else
+        \svn at updategroup{\svn at g}%
+      \fi
+      \if at svnmulti@subgroups
+        \ifsvnsubgroups
+          \svn at updategroup{\svn at filedir\svn at filebase}%
+        \fi
+      \fi
+    \fi
+  \fi
+}
+
+\def\@svncg at save#1#2{%
+  \expandafter\xdef\csname @svng@\svn at g @#1\endcsname{#2}%
+}
+
+
+\newcommand{\svnidlong}{%
+  \svnkwdef{LastChangedDate}{}%
+  \svnkwdef{LastChangedRevision}{0}%
+  \svnkwdef{LastChangedBy}{}%
+  \begingroup
+    \if at svnmulti@verbatim
+      \svn at catcodes
+      \catcode\{=12
+      \catcode\}=12
+    \else
+    \fi
+}
+
+\if at svnmulti@verbatim
+\def\svn at catcodes{%
+  \let\do\@makeother
+  \dospecials
+  \catcode\^^M9
+  \catcode\ 10
+  \catcode\{1
+  \catcode\}2
+}
+\else
+  \def\svn at catcodes{}
+\fi
+
+\if at svnmulti@verbatim
+\begingroup
+\catcode\{=12\catcode\}=12
+\catcode$$=1\catcode$$=2
+)
+\endgroup
+\fi
+
+  \endgroup
+  \ifx\svnkwLastChangedDate\empty\else
+    \@svn at scanlongdate{\svnkwLastChangedDate}%
+  \fi
+  \@svn at updateid{\svnkw{LastChangedRevision}}{\svnkw{LastChangedDate}}%
+  \ignorespaces
+}%
+
+\def\svnkwsave{%
+  \begingroup
+    \svn at catcodes
+}
+
+  \endgroup
+  \if at svnidsw
+    \ifx\svnkwId\empty\else
+      \expandafter
+      \svn at scanId\svnkwId\relax
+      \@svnidswfalse
+    \fi
+  \fi
+  \ignorespaces
+}
+
+\begingroup
+\if at svnmulti@verbatim
+\catcode\$=12 +\fi +\gdef\svnkwsave at read$#1$\relax{% + \svn at checkcolon#1:\relax +} +\endgroup + +\begingroup +\catcode\$=11
+\gdef\svnkwsave at parse$#1:#2${%
+  \expandafter\xdef\csname svnkw#1\endcsname{#2}%
+}%
+\endgroup
+
+\newcommand{\svnkwdef}{%
+  \@ifundefined{svnkwdef@#1}%
+    {\svnkwdef@{#1}{#2}}%
+    {\csname svnkwdef@#1\endcsname{#2}}%
+}
+
+\newcommand{\svnkwdef@}{%
+  \expandafter\xdef\csname svnkw#1\endcsname{#2}%
+}
+
+\def\svnkwdef at Rev#1{%
+  \svn at ifempty{#1}%
+    {\svnkwdef@{Rev}{0}}%
+    {\svnkwdef@{Rev}{#1}}%
+}
+\def\svnkwdef at Author#1{\svnkwdef@{Author}{#1}}
+\def\svnkwdef at Date#1{\svnkwdef@{Date}{#1}}
+\let\svnkwdef at Revision=\svnkwdef at Rev
+\let\svnkwdef at LastChangedRevision=\svnkwdef at Rev
+\let\svnkwdef at LastChangedBy=\svnkwdef at Author
+\let\svnkwdef at LastChangedAt=\svnkwdef at Date
+\def\svnkwRevision{\svnkwRev}
+\def\svnkwLastChangedRevision{\svnkwRev}
+\def\svnkwLastChangedBy{\svnkwAuthor}
+\def\svnkwLastChangedAt{\svnkwDate}
+
+\svnkwdef{Rev}{0}
+\svnkwdef{Date}{}
+\svnkwdef{Author}{}
+\svnkwdef{Filename}{}
+
+\newcommand{\svnkw}{%
+  \@ifundefined{svnkw#1}%
+    {\PackageWarning{svn-multi}{SVN keyword '#1' not defined (typo?)}}%
+    {\csname svnkw#1\endcsname}%
+}%
+
[TRUNCATED]

To get the complete diff run:
svnlook diff /svnroot/distr -r 753
`
{"ft_lang_label":"__label__en","ft_lang_prob":0.52970433,"math_prob":0.9415581,"size":33984,"snap":"2020-34-2020-40","text_gpt3_token_len":11491,"char_repetition_ratio":0.2278399,"word_repetition_ratio":0.12016238,"special_character_ratio":0.36452448,"punctuation_ratio":0.11738424,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98896456,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-08-05T16:03:44Z\",\"WARC-Record-ID\":\"<urn:uuid:3b6f97e0-e239-4816-a40d-918e31958bee>\",\"Content-Length\":\"69944\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:29a847ae-78f8-42b4-8b70-5df48da901a6>\",\"WARC-Concurrent-To\":\"<urn:uuid:a37cea64-5241-4c2e-8cfe-008a0d5b0485>\",\"WARC-IP-Address\":\"137.208.57.38\",\"WARC-Target-URI\":\"http://lists.r-forge.r-project.org/pipermail/distr-commits/2011-November/000613.html\",\"WARC-Payload-Digest\":\"sha1:FW6DW6QENPOBQG7AELJRSS77ZTDTMR7E\",\"WARC-Block-Digest\":\"sha1:QGP3SRTNTFW7VX3HVU4QG3EWASTBXKCX\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-34/CC-MAIN-2020-34_segments_1596439735963.64_warc_CC-MAIN-20200805153603-20200805183603-00132.warc.gz\"}"}