Commit cd4acf23 authored by Dirk Eddelbuettel's avatar Dirk Eddelbuettel

Update upstream source from tag 'upstream/3.5.3.20190419'

Update to upstream version '3.5.3.20190419'
with Debian dir fecad16641c5198c4db7b1bc80ba345e58306000
parents 15e423d3 cc9bb9c7
Revision: 76379 Revision: 76404
Last Changed Date: 2019-04-11 Last Changed Date: 2019-04-18
3.6.0 beta 3.6.0 RC
...@@ -306,16 +306,16 @@ CHANGES IN R 3.6.0: ...@@ -306,16 +306,16 @@ CHANGES IN R 3.6.0:
get a new rev argument to facilitate reversing the order of get a new rev argument to facilitate reversing the order of
colors. colors.
* Add update_PACKAGES() for incrementally updating a package
repository index, instead of rebuilding the index from scratch.
Thanks to Gabe Becker in PR#17544 for the patch, based on part of
his switchr package.
* New str2lang() and str2expression() as streamlined versions of * New str2lang() and str2expression() as streamlined versions of
parse(text=., keep.source=FALSE) allow to abstract typical call parse(text=., keep.source=FALSE) allow to abstract typical call
constructions, e.g., in formula manipulations. (Somewhat constructions, e.g., in formula manipulations. (Somewhat
experimental) experimental)
* Add update_PACKAGES() for incrementally updating a package
repository index, instead of rebuilding the index from scratch.
Thanks to Gabe Becker in PR#17544 for the patch, based on part of
his switchr package.
INSTALLATION on a UNIX-ALIKE: INSTALLATION on a UNIX-ALIKE:
* The options selected for the C++ compiler default to the C++11 * The options selected for the C++ compiler default to the C++11
...@@ -748,6 +748,15 @@ CHANGES IN R 3.6.0: ...@@ -748,6 +748,15 @@ CHANGES IN R 3.6.0:
* The S4 generic signature of rowSums(), rowMeans(), colSums() and * The S4 generic signature of rowSums(), rowMeans(), colSums() and
colMeans() is restricted to "x". colMeans() is restricted to "x".
* match(x, tab) now works for long _character_ vectors x, thanks to
PR#17552 by Andreas Kersting.
* Class unions are unloaded when their namespace is unloaded
(PR#17531, adapted from a patch by Brodie Gaslam).
* selectMethod() is robust to ANY-truncation of method signatures
(thanks to Herve Pages for the report).
CHANGES IN R 3.5.3: CHANGES IN R 3.5.3:
INSTALLATION on a UNIX-ALIKE: INSTALLATION on a UNIX-ALIKE:
......
...@@ -342,15 +342,15 @@ ...@@ -342,15 +342,15 @@
\code{gray.colors()}, etc.\sspace{}get a new \code{rev} argument \code{gray.colors()}, etc.\sspace{}get a new \code{rev} argument
to facilitate reversing the order of colors. to facilitate reversing the order of colors.
\item New \code{str2lang()} and \code{str2expression()} as streamlined
versions of \code{parse(text=., keep.source=FALSE)} allow to abstract
typical call constructions, e.g., in \code{formula} manipulations.
(Somewhat experimental) % << TO DO
\item Add \code{update_PACKAGES()} for incrementally updating a \item Add \code{update_PACKAGES()} for incrementally updating a
package repository index, instead of rebuilding the index from package repository index, instead of rebuilding the index from
scratch. Thanks to Gabe Becker in \PR{17544} for the patch, based scratch. Thanks to Gabe Becker in \PR{17544} for the patch, based
on part of his \pkg{switchr} package. on part of his \pkg{switchr} package.
\item New \code{str2lang()} and \code{str2expression()} as streamlined
versions of \code{parse(text=., keep.source=FALSE)} allow to abstract
typical call constructions, e.g., in \code{formula} manipulations.
(Somewhat experimental)
} }
} }
...@@ -830,6 +830,15 @@ ...@@ -830,6 +830,15 @@
\item The S4 generic signature of \code{rowSums()}, \item The S4 generic signature of \code{rowSums()},
\code{rowMeans()}, \code{colSums()} and \code{colMeans()} is \code{rowMeans()}, \code{colSums()} and \code{colMeans()} is
restricted to \code{"x"}. restricted to \code{"x"}.
\item \code{match(x, tab)} now works for long \emph{character}
vectors \code{x}, thanks to \PR{17552} by Andreas Kersting.
\item Class unions are unloaded when their namespace is
unloaded (\PR{17531}, adapted from a patch by Brodie Gaslam).
\item \code{selectMethod()} is robust to ANY-truncation of method
signatures (thanks to Herve Pages for the report).
} }
} }
} }
......
No preview for this file type
...@@ -424,17 +424,17 @@ names for <code>hcl.colors()</code>. ...@@ -424,17 +424,17 @@ names for <code>hcl.colors()</code>.
to facilitate reversing the order of colors. to facilitate reversing the order of colors.
</p> </p>
</li> </li>
<li><p> New <code>str2lang()</code> and <code>str2expression()</code> as streamlined
versions of <code>parse(text=., keep.source=FALSE)</code> allow to abstract
typical call constructions, e.g., in <code>formula</code> manipulations.
(Somewhat experimental)
</p>
</li>
<li><p> Add <code>update_PACKAGES()</code> for incrementally updating a <li><p> Add <code>update_PACKAGES()</code> for incrementally updating a
package repository index, instead of rebuilding the index from package repository index, instead of rebuilding the index from
scratch. Thanks to Gabe Becker in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17544">PR#17544</a> for the patch, based scratch. Thanks to Gabe Becker in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17544">PR#17544</a> for the patch, based
on part of his <span class="pkg">switchr</span> package. on part of his <span class="pkg">switchr</span> package.
</p> </p>
</li>
<li><p> New <code>str2lang()</code> and <code>str2expression()</code> as streamlined
versions of <code>parse(text=., keep.source=FALSE)</code> allow to abstract
typical call constructions, e.g., in <code>formula</code> manipulations.
(Somewhat experimental)
</p>
</li></ul> </li></ul>
...@@ -1043,6 +1043,18 @@ logicals, thanks to <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?i ...@@ -1043,6 +1043,18 @@ logicals, thanks to <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?i
<code>rowMeans()</code>, <code>colSums()</code> and <code>colMeans()</code> is <code>rowMeans()</code>, <code>colSums()</code> and <code>colMeans()</code> is
restricted to <code>"x"</code>. restricted to <code>"x"</code>.
</p> </p>
</li>
<li> <p><code>match(x, tab)</code> now works for long <em>character</em>
vectors <code>x</code>, thanks to <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17552">PR#17552</a> by Andreas Kersting.
</p>
</li>
<li><p> Class unions are unloaded when their namespace is
unloaded (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17531">PR#17531</a>, adapted from a patch by Brodie Gaslam).
</p>
</li>
<li> <p><code>selectMethod()</code> is robust to ANY-truncation of method
signatures (thanks to Herve Pages for the report).
</p>
</li></ul> </li></ul>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<!-- This manual is for R, version 3.6.0 beta (2019-04-11). <!-- This manual is for R, version 3.6.0 RC (2019-04-18).
Copyright (C) 2001-2018 R Core Team Copyright (C) 2001-2018 R Core Team
...@@ -332,7 +332,7 @@ p { ...@@ -332,7 +332,7 @@ p {
<p>This is a guide to installation and administration for R. <p>This is a guide to installation and administration for R.
</p> </p>
<p>This manual is for R, version 3.6.0 beta (2019-04-11). <p>This manual is for R, version 3.6.0 RC (2019-04-18).
</p> </p>
<p>Copyright &copy; 2001&ndash;2018 R Core Team <p>Copyright &copy; 2001&ndash;2018 R Core Team
</p> </p>
...@@ -1440,7 +1440,7 @@ conversion to short name equivalents (a.k.a. DOS 8.3 names), then R ...@@ -1440,7 +1440,7 @@ conversion to short name equivalents (a.k.a. DOS 8.3 names), then R
<em>must</em> be installed in a path that does not contain spaces. <em>must</em> be installed in a path that does not contain spaces.
</p> </p>
<p>Installation is <em>via</em> the installer <p>Installation is <em>via</em> the installer
<samp>R-3.6.0beta-win.exe</samp>. Just double-click on the icon and <samp>R-3.6.0rc-win.exe</samp>. Just double-click on the icon and
follow the instructions. When installing on a 64-bit version of Windows follow the instructions. When installing on a 64-bit version of Windows
the options will include 32- or 64-bit versions of R (and the default is the options will include 32- or 64-bit versions of R (and the default is
to install both). You can uninstall R from the Control Panel. to install both). You can uninstall R from the Control Panel.
...@@ -1836,7 +1836,7 @@ source tree) in <samp>src/gnuwin32/installer</samp> run ...@@ -1836,7 +1836,7 @@ source tree) in <samp>src/gnuwin32/installer</samp> run
installation (in double quotes if it contains spaces or backslashes). installation (in double quotes if it contains spaces or backslashes).
</p> </p>
<p>Both methods create an executable with a standard name such as <p>Both methods create an executable with a standard name such as
<samp>R-3.6.0beta-win.exe</samp>, so please rename it to indicate that <samp>R-3.6.0rc-win.exe</samp>, so please rename it to indicate that
it is customized. If you intend to <em>distribute</em> a customized it is customized. If you intend to <em>distribute</em> a customized
installer please do check that license requirements are met &ndash; note that installer please do check that license requirements are met &ndash; note that
the installer will state that the contents are distributed under GPL the installer will state that the contents are distributed under GPL
...@@ -1895,21 +1895,21 @@ make msi ...@@ -1895,21 +1895,21 @@ make msi
</pre></div> </pre></div>
<p>which will result in a file with a name like <p>which will result in a file with a name like
<samp>R-3.6.0beta-win32.msi</samp>. This can be double-clicked to be <samp>R-3.6.0rc-win32.msi</samp>. This can be double-clicked to be
installed, but those who need it will know what to do with it (usually installed, but those who need it will know what to do with it (usually
by running <code>msiexec /i</code> with additional options). Properties by running <code>msiexec /i</code> with additional options). Properties
that users might want to set from the <code>msiexec</code> command line that users might want to set from the <code>msiexec</code> command line
include &lsquo;<samp>ALLUSERS</samp>&rsquo;, &lsquo;<samp>INSTALLDIR</samp>&rsquo; (something like include &lsquo;<samp>ALLUSERS</samp>&rsquo;, &lsquo;<samp>INSTALLDIR</samp>&rsquo; (something like
<samp>c:\Program Files\R\R-3.6.0beta</samp>) and &lsquo;<samp>RMENU</samp>&rsquo; (the path <samp>c:\Program Files\R\R-3.6.0rc</samp>) and &lsquo;<samp>RMENU</samp>&rsquo; (the path
to the &lsquo;<samp>R</samp>&rsquo; folder on the start menu) and &lsquo;<samp>STARTDIR</samp>&rsquo; (the to the &lsquo;<samp>R</samp>&rsquo; folder on the start menu) and &lsquo;<samp>STARTDIR</samp>&rsquo; (the
starting directory for R shortcuts, defaulting to something like starting directory for R shortcuts, defaulting to something like
<samp>c:\Users\name\Documents\R</samp>). <samp>c:\Users\name\Documents\R</samp>).
</p> </p>
<p>The MSI installer can be built both from a 32-bit build of R <p>The MSI installer can be built both from a 32-bit build of R
(<samp>R-3.6.0beta-win32.msi</samp>) and from a 64-bit build of R (<samp>R-3.6.0rc-win32.msi</samp>) and from a 64-bit build of R
(<samp>R-3.6.0beta-win64.msi</samp>, optionally including 32-bit files (<samp>R-3.6.0rc-win64.msi</samp>, optionally including 32-bit files
by setting the macro <code>HOME32</code>, when the name is by setting the macro <code>HOME32</code>, when the name is
<samp>R-3.6.0beta-win.msi</samp>). Unlike the main installer, a 64-bit <samp>R-3.6.0rc-win.msi</samp>). Unlike the main installer, a 64-bit
MSI installer can only be run on 64-bit Windows. MSI installer can only be run on 64-bit Windows.
</p> </p>
<p>Thanks to David del Campo (Dept of Statistics, University of Oxford) <p>Thanks to David del Campo (Dept of Statistics, University of Oxford)
...@@ -5847,7 +5847,7 @@ install LaTeX packages on first use. ...@@ -5847,7 +5847,7 @@ install LaTeX packages on first use.
<a name="The-Inno-Setup-installer-1"></a> <a name="The-Inno-Setup-installer-1"></a>
<h3 class="section">D.2 The Inno Setup installer</h3> <h3 class="section">D.2 The Inno Setup installer</h3>
<p>To make the installer package (<samp>R-3.6.0beta-win.exe</samp>) we <p>To make the installer package (<samp>R-3.6.0rc-win.exe</samp>) we
currently require the Unicode version of Inno Setup 5.3.7 or later from currently require the Unicode version of Inno Setup 5.3.7 or later from
<a href="http://jrsoftware.org/">http://jrsoftware.org/</a>. This is <em>not</em> included in <a href="http://jrsoftware.org/">http://jrsoftware.org/</a>. This is <em>not</em> included in
<samp>Rtools*.exe</samp>. <samp>Rtools*.exe</samp>.
......
...@@ -5145,7 +5145,7 @@ may have an `overloading ambiguity'. ...@@ -5145,7 +5145,7 @@ may have an `overloading ambiguity'.
A surprising common misuse is things like @code{pow(10, -3)}: this A surprising common misuse is things like @code{pow(10, -3)}: this
should be the constant @code{1e-3}. Note that there are constants such should be the constant @code{1e-3}. Note that there are constants such
as @code{M_SQRT2} defined in @file{Rmath.h}@footnote{often taken from as @code{M_SQRT2} defined in @file{Rmath.h}@footnote{often taken from
the toolchains's headers.} for @code{sqrt(2.0)}, frequently mis-coded as the toolchain's headers.} for @code{sqrt(2.0)}, frequently mis-coded as
@code{sqrt(2)}. @code{sqrt(2)}.
@item @item
......
rpart_4.1-13.tar.gz rpart_4.1-15.tar.gz
\ No newline at end of file \ No newline at end of file
...@@ -113,7 +113,7 @@ set.seed <- function(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL) ...@@ -113,7 +113,7 @@ set.seed <- function(seed, kind = NULL, normal.kind = NULL, sample.kind = NULL)
domain = NA) domain = NA)
if(sample.kind == length(s.kinds) - 1L) sample.kind <- -1L if(sample.kind == length(s.kinds) - 1L) sample.kind <- -1L
} }
.Internal(set.seed(seed, i.knd, normal.kind)) .Internal(set.seed(seed, i.knd, normal.kind, sample.kind))
} }
# Compatibility function to set RNGkind as in a given R version # Compatibility function to set RNGkind as in a given R version
......
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -95,4 +95,4 @@ null device ...@@ -95,4 +95,4 @@ null device
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.497 0.050 0.525 0.494 0.056 0.533
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -102,4 +102,4 @@ Type 'q()' to quit R. ...@@ -102,4 +102,4 @@ Type 'q()' to quit R.
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.199 0.039 0.214 0.193 0.038 0.214
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -340,4 +340,4 @@ List of 6 ...@@ -340,4 +340,4 @@ List of 6
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.259 0.060 0.299 0.264 0.051 0.295
...@@ -830,6 +830,11 @@ cacheMetaData <- ...@@ -830,6 +830,11 @@ cacheMetaData <-
identical(cldef@package, pkg)) { identical(cldef@package, pkg)) {
.uncacheClass(cl, cldef) .uncacheClass(cl, cldef)
.removeSuperclassBackRefs(cl, cldef, searchWhere) .removeSuperclassBackRefs(cl, cldef, searchWhere)
if(is(cldef, "ClassUnionRepresentation")) {
subclasses <- names(cldef@subclasses)
for(subclass in subclasses)
.removeSuperClass(subclass, cl)
}
} }
} }
} }
...@@ -1056,7 +1061,12 @@ methodSignatureMatrix <- function(object, sigSlots = c("target", "defined")) ...@@ -1056,7 +1061,12 @@ methodSignatureMatrix <- function(object, sigSlots = c("target", "defined"))
{ {
if(length(sigSlots)) { if(length(sigSlots)) {
allSlots <- lapply(sigSlots, slot, object = object) allSlots <- lapply(sigSlots, slot, object = object)
mm <- unlist(allSlots) n <- max(lengths(allSlots))
mm <- unlist(lapply(allSlots, function(s) {
length(s) <- n
s[is.na(s)] <- "ANY"
s
}))
mm <- matrix(mm, nrow = length(allSlots), byrow = TRUE) mm <- matrix(mm, nrow = length(allSlots), byrow = TRUE)
dimnames(mm) <- list(sigSlots, names(allSlots[[1L]])) dimnames(mm) <- list(sigSlots, names(allSlots[[1L]]))
mm mm
......
...@@ -444,6 +444,16 @@ ...@@ -444,6 +444,16 @@
.sigLabel <- function(sig) .sigLabel <- function(sig)
paste(sig, collapse = "#") paste(sig, collapse = "#")
.fillSignatures <- function(sigs, n) {
siglens <- lengths(strsplit(sigs, "#", fixed=TRUE))
short <- n > siglens
suffix <- vapply(n - siglens[short],
function(ni) paste(rep("ANY", ni), collapse="#"),
character(1L))
sigs[short] <- paste(sigs[short], suffix, sep="#")
sigs
}
## workhorse of selectMethod() [ -> ../Methods.R ] " ## workhorse of selectMethod() [ -> ../Methods.R ] "
.findInheritedMethods <- .findInheritedMethods <-
function(classes, fdef, mtable = NULL, function(classes, fdef, mtable = NULL,
...@@ -524,8 +534,9 @@ ...@@ -524,8 +534,9 @@
if(verbose >= 2) { cat("; labels = \n") ; print(labels) } if(verbose >= 2) { cat("; labels = \n") ; print(labels) }
} }
allMethods <- names(table) allMethods <- names(table)
found <- labels %in% allMethods m <- match(labels, .fillSignatures(allMethods, length(classes)))
methods <- mget(labels[found], table) found <- !is.na(m)
methods <- mget(allMethods[m[found]], table)
if(verbose) cat(" >> found: ", length(methods), "\n") if(verbose) cat(" >> found: ", length(methods), "\n")
if(hasGroup) { if(hasGroup) {
## add the group methods recursively found but each time ## add the group methods recursively found but each time
......
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -45,4 +45,4 @@ Calculations on Transformed Scale; Intervals on Original Scale ...@@ -45,4 +45,4 @@ Calculations on Transformed Scale; Intervals on Original Scale
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.380 0.102 0.329 0.355 0.116 0.352
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -50,4 +50,4 @@ Calculations on Transformed Scale; Intervals on Original Scale ...@@ -50,4 +50,4 @@ Calculations on Transformed Scale; Intervals on Original Scale
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.202 0.049 0.769 0.188 0.053 0.761
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -46,4 +46,4 @@ In bw.bcv(precip) : minimum occurred at one end of the range ...@@ -46,4 +46,4 @@ In bw.bcv(precip) : minimum occurred at one end of the range
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.182 0.048 0.208 0.191 0.034 0.208
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -199,4 +199,4 @@ Number of Fisher Scoring iterations: 3 ...@@ -199,4 +199,4 @@ Number of Fisher Scoring iterations: 3
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.252 0.043 0.276 0.254 0.043 0.275
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -362,4 +362,4 @@ difference in location 3.741417e-05 3.741417e-05 3.741417e-05 ...@@ -362,4 +362,4 @@ difference in location 3.741417e-05 3.741417e-05 3.741417e-05
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.361 0.050 0.394 0.359 0.052 0.394
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -738,4 +738,4 @@ Consider specifying 'start' or using a selfStart model ...@@ -738,4 +738,4 @@ Consider specifying 'start' or using a selfStart model
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
1.612 0.079 1.680 1.595 0.075 1.657
R version 3.6.0 alpha (2019-04-08 r76341) R version 3.6.0 beta (2019-04-15 r76395) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
...@@ -412,4 +412,4 @@ log(u) 0.015569 0.00033659 46.256 5.7704e-10 ...@@ -412,4 +412,4 @@ log(u) 0.015569 0.00033659 46.256 5.7704e-10
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.278 0.059 0.319 0.282 0.052 0.316
...@@ -546,7 +546,7 @@ SEXP attribute_hidden do_RNGkind (SEXP call, SEXP op, SEXP args, SEXP env) ...@@ -546,7 +546,7 @@ SEXP attribute_hidden do_RNGkind (SEXP call, SEXP op, SEXP args, SEXP env)
SEXP attribute_hidden do_setseed (SEXP call, SEXP op, SEXP args, SEXP env) SEXP attribute_hidden do_setseed (SEXP call, SEXP op, SEXP args, SEXP env)
{ {
SEXP skind, nkind; SEXP skind, nkind, sampkind;
int seed; int seed;
checkArity(op, args); checkArity(op, args);
...@@ -557,10 +557,12 @@ SEXP attribute_hidden do_setseed (SEXP call, SEXP op, SEXP args, SEXP env) ...@@ -557,10 +557,12 @@ SEXP attribute_hidden do_setseed (SEXP call, SEXP op, SEXP args, SEXP env)
} else seed = TimeToSeed(); } else seed = TimeToSeed();
skind = CADR(args); skind = CADR(args);
nkind = CADDR(args); nkind = CADDR(args);
sampkind = CADDDR(args);
GetRNGkind(R_NilValue); /* pull RNG_kind, N01_kind from GetRNGkind(R_NilValue); /* pull RNG_kind, N01_kind from
.Random.seed if present */ .Random.seed if present */
if (!isNull(skind)) RNGkind((RNGtype) asInteger(skind)); if (!isNull(skind)) RNGkind((RNGtype) asInteger(skind));
if (!isNull(nkind)) Norm_kind((N01type) asInteger(nkind)); if (!isNull(nkind)) Norm_kind((N01type) asInteger(nkind));
if(!isNull(sampkind)) Samp_kind((Sampletype) asInteger(sampkind));
RNG_Init(RNG_kind, (Int32) seed); /* zaps BM history */ RNG_Init(RNG_kind, (Int32) seed); /* zaps BM history */
PutRNGstate(); PutRNGstate();
return R_NilValue; return R_NilValue;
......
...@@ -1619,10 +1619,14 @@ SEXP attribute_hidden do_str2lang(SEXP call, SEXP op, SEXP args, SEXP rho) { ...@@ -1619,10 +1619,14 @@ SEXP attribute_hidden do_str2lang(SEXP call, SEXP op, SEXP args, SEXP rho) {
errorcall(call, _("argument must be character")); errorcall(call, _("argument must be character"));
Rboolean to_lang = !PRIMVAL(op); // op = 0: character *string* to call-like Rboolean to_lang = !PRIMVAL(op); // op = 0: character *string* to call-like
if(to_lang) if(to_lang) {
if(LENGTH(args) != 1) if(LENGTH(args) != 1)
errorcall(call, _("argument must be a character string")); errorcall(call, _("argument must be a character string"));
// basically parse(text = "....")[[1]] : // basically parse(text = "...."), for str2lang() '[[1]]' :
} else // str2expression()
if(!LENGTH(args))
return(allocVector(EXPRSXP, 0));
ParseStatus status; ParseStatus status;
SEXP srcfile = PROTECT(mkString("<text>")); SEXP srcfile = PROTECT(mkString("<text>"));
SEXP ans = PROTECT(R_ParseVector(args, -1, &status, srcfile)); SEXP ans = PROTECT(R_ParseVector(args, -1, &status, srcfile));
......
...@@ -3136,16 +3136,16 @@ static void R_gc_internal(R_size_t size_needed) ...@@ -3136,16 +3136,16 @@ static void R_gc_internal(R_size_t size_needed)
sexptype2char(first_bad_sexp_type_old_type), sexptype2char(first_bad_sexp_type_old_type),
first_bad_sexp_type_line); first_bad_sexp_type_line);
else else
error("GC encountered a node (%p) with an unknown SEXP type: %s" error("GC encountered a node (%p) with an unknown SEXP type: %d"
" at memory.c:%d", " at memory.c:%d",
first_bad_sexp_type_sexp, first_bad_sexp_type_sexp,
sexptype2char(first_bad_sexp_type), first_bad_sexp_type,
first_bad_sexp_type_line); first_bad_sexp_type_line);
#else #else
error("GC encountered a node (%p) with an unknown SEXP type: %s" error("GC encountered a node (%p) with an unknown SEXP type: %d"
" at memory.c:%d", " at memory.c:%d",
first_bad_sexp_type_sexp, first_bad_sexp_type_sexp,
sexptype2char(first_bad_sexp_type), first_bad_sexp_type,
first_bad_sexp_type_line); first_bad_sexp_type_line);
#endif #endif
} }
......
...@@ -480,7 +480,7 @@ FUNTAB R_FunTab[] = ...@@ -480,7 +480,7 @@ FUNTAB R_FunTab[] =
{"sample2", do_sample2, 0, 11, 2, {PP_FUNCALL, PREC_FN, 0}}, {"sample2", do_sample2, 0, 11, 2, {PP_FUNCALL, PREC_FN, 0}},
{"RNGkind", do_RNGkind, 0, 11, 3, {PP_FUNCALL, PREC_FN, 0}}, {"RNGkind", do_RNGkind, 0, 11, 3, {PP_FUNCALL, PREC_FN, 0}},
{"set.seed", do_setseed, 0, 111, 3, {PP_FUNCALL, PREC_FN, 0}}, {"set.seed", do_setseed, 0, 111, 4, {PP_FUNCALL, PREC_FN, 0}},
/* Data Summaries */ /* Data Summaries */
/* these four are group generic and so need to eval args */ /* these four are group generic and so need to eval args */
......
/* /*
* R : A Computer Language for Statistical Data Analysis * R : A Computer Language for Statistical Data Analysis
* Copyright (C) 1997--2018 The R Core Team * Copyright (C) 1997--2019 The R Core Team
* Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -909,11 +909,6 @@ SEXP match5(SEXP itable, SEXP ix, int nmatch, SEXP incomp, SEXP env) ...@@ -909,11 +909,6 @@ SEXP match5(SEXP itable, SEXP ix, int nmatch, SEXP incomp, SEXP env)
// special case scalar x -- for speed only : // special case scalar x -- for speed only :
if(XLENGTH(x) == 1 && !incomp) { if(XLENGTH(x) == 1 && !incomp) {
int val = nmatch; int val = nmatch;
/* FIXME:
The code for the special case uses LENGTH(table),
the code for the regular case uses length(table):
These should use the same.
*/
int ntable = LENGTH(table); int ntable = LENGTH(table);
switch (type) { switch (type) {
case STRSXP: {