Skip to content

Commit

Permalink
missed updates
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87311 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Nov 9, 2024
1 parent 4d68189 commit f8cf131
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 53 deletions.
13 changes: 7 additions & 6 deletions tests/Examples/datasets-Ex.Rout.save
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

R Under development (unstable) (2024-03-04 r86047) -- "Unsuffered Consequences"
R Under development (unstable) (2024-11-08 r87310) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu
Platform: aarch64-apple-darwin24.1.0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Expand Down Expand Up @@ -3158,7 +3158,7 @@ HI -126.25 31.75
> require(stats); require(graphics)
> ## Compare the monthly series
> plot (sunspot.month,
+ main="sunspot.month & sunspots [package'datasets']", col=2)
+ main="sunspot.month & sunspots [package 'datasets']", col=2)
> lines(sunspots) # -> faint differences where they overlap
>
> ## Now look at the difference :
Expand Down Expand Up @@ -3329,6 +3329,7 @@ FALSE TRUE
> ssm0 <- sunspot.month[1:2988]
> with(as.data.frame(.sunspot.diff), ssm0[i] <<- ssm0[i] - res10/10)
> sunspot.month.0 <- ts(ssm0, start = 1749, frequency = 12)
> stopifnot(length(sunspot.month.0) == 2988)
>
>
>
Expand All @@ -3352,10 +3353,10 @@ FALSE TRUE
> ## The common time interval
> (t1 <- c(max(start(sm), start(sy)), 1)) # Jan 1749
[1] 1749 1
> (t2 <- c(min( end(sm)[1],end(sy)[1]), 12)) # Dec 1983
> (t2 <- c(min( end(sm)[1],end(sy)[1]), 12)) # Dec 1983 (will not be updated!)
[1] 1983 12
> s.m <- window(sm, start=t1, end=t2)
> s.y <- window(sy, start=t1, end=t2[1]) # {irrelevant warning}
> s.y <- window(sy, start=t1, end=t2[1])
> stopifnot(length(s.y) * 12 == length(s.m),
+ ## The yearly series *is* close to the averages of the monthly one:
+ all.equal(s.y, aggregate(s.m, FUN = mean), tolerance = 0.0020))
Expand Down Expand Up @@ -3694,7 +3695,7 @@ c0 -5.14
> cleanEx()
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed: 1.781 0.033 1.814 0 0
Time elapsed: 1.091 0.066 1.158 0 0
> grDevices::dev.off()
null device
1
Expand Down
92 changes: 45 additions & 47 deletions tests/Examples/stats-Ex.Rout.save
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@

R Under development (unstable) (2024-08-21 r87038) -- "Unsuffered Consequences"
R Under development (unstable) (2024-11-08 r87310) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu
Platform: aarch64-apple-darwin24.1.0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Expand Down Expand Up @@ -1268,16 +1266,16 @@ Residual standard error: 0.04103 on 7 degrees of freedom
+ nls(conc ~ SSbiexp(time, A1, lrc1, A2, lrc2), data = datN,
+ trace=TRUE, control = list(maxiter = 10)) )
0.01722077 (5.34e+02): par = (0.6168807 -1.783839 2.050204 0.2004597)
3.308943e-06 (1.13e+04): par = (0.5798674 -1.784335 2.028943 0.1920502)
2.571069e-11 (7.68e+06): par = (0.5793882 -1.78778 2.029276 0.1915479)
1.669346e-23 (5.53e+03): par = (0.5793887 -1.787785 2.029277 0.1915475)
2.285755e-29 (1.59e+01): par = (0.5793887 -1.787785 2.029277 0.1915475)
1.345909e-29 (1.20e+01): par = (0.5793887 -1.787785 2.029277 0.1915475)
1.224242e-29 (9.63e+00): par = (0.5793887 -1.787785 2.029277 0.1915475)
1.224242e-29 (9.63e+00): par = (0.5793887 -1.787785 2.029277 0.1915475)
1.224242e-29 (9.63e+00): par = (0.5793887 -1.787785 2.029277 0.1915475)
1.224242e-29 (9.63e+00): par = (0.5793887 -1.787785 2.029277 0.1915475)
1.224242e-29 (9.63e+00): par = (0.5793887 -1.787785 2.029277 0.1915475)
3.308944e-06 (1.13e+04): par = (0.5798674 -1.784335 2.028943 0.1920502)
2.571079e-11 (7.68e+06): par = (0.5793882 -1.78778 2.029276 0.1915479)
1.650535e-23 (2.91e+03): par = (0.5793887 -1.787785 2.029277 0.1915475)
3.486470e-28 (9.76e-01): par = (0.5793887 -1.787785 2.029277 0.1915475)
3.475413e-28 (1.03e+00): par = (0.5793887 -1.787785 2.029277 0.1915475)
3.425893e-28 (5.48e-01): par = (0.5793887 -1.787785 2.029277 0.1915475)
3.425893e-28 (5.48e-01): par = (0.5793887 -1.787785 2.029277 0.1915475)
3.425893e-28 (5.48e-01): par = (0.5793887 -1.787785 2.029277 0.1915475)
3.425893e-28 (5.48e-01): par = (0.5793887 -1.787785 2.029277 0.1915475)
3.425893e-28 (5.48e-01): par = (0.5793887 -1.787785 2.029277 0.1915475)
Error in nls(y ~ cbind(exp(-exp(lrc1) * x), exp(-exp(lrc2) * x)), data = xy, :
number of iterations exceeded maximum of 10
> ## End(Don't show)
Expand All @@ -1290,13 +1288,13 @@ Error in nls(y ~ cbind(exp(-exp(lrc1) * x), exp(-exp(lrc2) * x)), data = xy, :
3.308942e-06 (9.08e-04): par = (0.5798674 -1.784335 2.028943 0.1920502)
It. 2, fac= 1, eval (no.,total): ( 1, 2): new dev = 2.57108e-11
2.571081e-11 (2.53e-06): par = (0.5793882 -1.78778 2.029276 0.1915479)
It. 3, fac= 1, eval (no.,total): ( 1, 3): new dev = 1.66926e-23
1.669257e-23 (2.04e-12): par = (0.5793887 -1.787785 2.029277 0.1915475)
1.670550e-23 (1.67e-13): par = (2.029277 0.5793887 0.1915475 -1.787785)
It. 3, fac= 1, eval (no.,total): ( 1, 3): new dev = 1.66968e-23
1.669677e-23 (2.04e-12): par = (0.5793887 -1.787785 2.029277 0.1915475)
1.667503e-23 (1.67e-13): par = (2.029277 0.5793887 0.1915475 -1.787785)
> all.equal(coef(fm1), coef(fmX1), tolerance=0) # ... rel.diff.: 1.57e-6
[1] "Mean relative difference: 1.574118e-06"
[1] "Mean relative difference: 1.574121e-06"
> all.equal(coef(fm1), coef(fmX), tolerance=0) # ... rel.diff.: 1.03e-12
[1] "Mean relative difference: 1.032123e-12"
[1] "Mean relative difference: 1.031016e-12"
> ## IGNORE_RDIFF_END
> stopifnot(all.equal(coef(fm1), coef(fmX1), tolerance = 6e-6),
+ all.equal(coef(fm1), coef(fmX ), tolerance = 1e-11))
Expand Down Expand Up @@ -5126,7 +5124,7 @@ function (V)
r[seq.int(from = 1L, by = p + 1L, length.out = p)] <- 1
r
}
<bytecode: 0x55b297bbece0>
<bytecode: 0x10b83cec8>
<environment: namespace:stats>
> stopifnot(all.equal(Cl, cov2cor(cov(longley))),
+ all.equal(cor(longley, method = "kendall"),
Expand Down Expand Up @@ -7774,7 +7772,7 @@ attr(,".Environment")
> environment(as.formula("y ~ x"))
<environment: R_GlobalEnv>
> environment(as.formula("y ~ x", env = new.env()))
<environment: 0x55b2975fdb10>
<environment: 0x10d923d98>
>
>
> ## Create a formula for a model with a large number of variables:
Expand Down Expand Up @@ -8722,7 +8720,7 @@ Error in integrate(f, 0, 1) :
0.5 with absolute error < 1.6e-07
> integrate(dnorm, 0, 2000)
0.5 with absolute error < 4.4e-06
> integrate(dnorm, 0, 20000) ## fails on many systems
> integrate(dnorm, 0, 20000) ## "fails" on many systems -- "wrongly" giving '0'
0 with absolute error < 0
> integrate(dnorm, 0, Inf) ## works
0.5 with absolute error < 4.7e-05
Expand Down Expand Up @@ -9022,23 +9020,23 @@ totss 60.99123 60.99123
> ## The ordering of the clusters may be platform-dependent.
> ## IGNORE_RDIFF_BEGIN
> (cl <- kmeans(x, 5, nstart = 25))
K-means clustering with 5 clusters of sizes 12, 24, 24, 15, 25
K-means clustering with 5 clusters of sizes 12, 15, 25, 24, 24

Cluster means:
x y
1 1.3290081 1.1185534
2 0.1581362 -0.1761590
3 0.8043520 0.7805033
4 0.8609139 1.3145869
5 -0.1096832 0.2106891
2 0.8609139 1.3145869
3 -0.1096832 0.2106891
4 0.1581362 -0.1761590
5 0.8043520 0.7805033

Clustering vector:
[1] 5 2 5 2 5 5 2 2 5 5 3 2 5 5 2 5 2 5 2 5 2 2 5 5 2 5 2 5 5 2 2 2 5 2 5 5 5
[38] 2 2 2 2 5 5 5 5 5 2 2 2 2 4 3 3 3 3 1 1 1 3 1 4 3 1 4 3 4 3 3 1 4 4 1 4 3
[75] 3 1 4 4 4 4 3 4 1 3 1 3 4 3 3 3 3 1 3 4 3 3 1 3 4 3
[1] 3 4 3 4 3 3 4 4 3 3 5 4 3 3 4 3 4 3 4 3 4 4 3 3 4 3 4 3 3 4 4 4 3 4 3 3 3
[38] 4 4 4 4 3 3 3 3 3 4 4 4 4 2 5 5 5 5 1 1 1 5 1 2 5 1 2 5 2 5 5 1 2 2 1 2 5
[75] 5 1 2 2 2 2 5 2 1 5 1 5 2 5 5 5 5 1 5 2 5 5 1 5 2 5

Within cluster sum of squares by cluster:
[1] 1.0314888 1.2816507 1.5056575 0.7104553 2.5330710
[1] 1.0314888 0.7104553 2.5330710 1.2816507 1.5056575
(between_SS / total_SS = 88.4 %)

Available components:
Expand Down Expand Up @@ -11352,16 +11350,16 @@ Initializing ‘Const’, ‘A’, ‘B’ to '1.'.
Consider specifying 'start' or using a selfStart model
1017460.306 (4.15e+02): par = (1 1 1)
758164.7503 (2.34e+02): par = (13.42031396 1.961485 0.05947543745)
269506.3539 (3.23e+02): par = (51.75719815 -13.09155956 0.8428607704)
68969.21896 (1.03e+02): par = (76.0006985 -1.93522674 1.019085799)
633.3672231 (1.29e+00): par = (100.3761515 8.624648403 5.104490265)
151.4400225 (9.39e+00): par = (100.6344391 4.913490981 0.2849209558)
53.08739902 (7.24e+00): par = (100.6830407 6.899303306 0.4637755073)
1.344478646 (5.97e-01): par = (100.0368306 9.897714142 0.516929494)
269506.3538 (3.23e+02): par = (51.75719816 -13.09155956 0.8428607705)
68969.21895 (1.03e+02): par = (76.0006985 -1.935226741 1.019085799)
633.3672233 (1.29e+00): par = (100.3761515 8.624648407 5.104490263)
151.4400223 (9.39e+00): par = (100.6344391 4.913490982 0.2849209561)
53.08739887 (7.24e+00): par = (100.6830407 6.899303309 0.4637755073)
1.344478645 (5.97e-01): par = (100.0368306 9.897714142 0.516929494)
0.9908415909 (1.55e-02): par = (100.0300625 9.9144191 0.5023516843)
0.9906046057 (1.84e-05): par = (100.0288724 9.916224018 0.5025207337)
0.9906046054 (9.94e-08): par = (100.028875 9.916228366 0.50252165)
0.9906046054 (5.87e-10): par = (100.028875 9.916228388 0.5025216549)
0.9906046054 (9.93e-08): par = (100.028875 9.916228366 0.50252165)
0.9906046054 (6.56e-10): par = (100.028875 9.916228388 0.5025216549)
Nonlinear regression model
model: y ~ Const + A * exp(B * x)
data: parent.frame()
Expand Down Expand Up @@ -12716,14 +12714,14 @@ attr(,"class")
$linkfun
function (mu)
mu^lambda
<bytecode: 0x55b297781bb8>
<environment: 0x55b29752c6a0>
<bytecode: 0x10dce8030>
<environment: 0x10dcf1fd8>

$linkinv
function (eta)
pmax(eta^(1/lambda), .Machine$double.eps)
<bytecode: 0x55b297781a30>
<environment: 0x55b29752c6a0>
<bytecode: 0x10dce7ee0>
<environment: 0x10dcf1fd8>

>
>
Expand Down Expand Up @@ -16179,7 +16177,7 @@ Contrast 1 Contrast 2 Contrast 3
> getInitial(weight ~ mySSlogis(Time, Asym, xmid, scal),
+ data = subset(ChickWeight, Chick == 1))
Asym xmid scal
937.03011 35.22296 11.40521
937.03000 35.22296 11.40521
> ## IGNORE_RDIFF_END
>
> # 'first.order.log.model' is a function object defining a first order
Expand Down Expand Up @@ -17082,8 +17080,8 @@ Step function with continuity 'f'= 0.2 , 3 knots at
> unclass(sfun0)
function (v)
.approxfun(x, y, v, method, yleft, yright, f, na.rm)
<bytecode: 0x55b2973e08c0>
<environment: 0x55b293689d40>
<bytecode: 0x12c5bc600>
<environment: 0x10d8ab2d8>
attr(,"call")
stepfun(1:3, y0, f = 0)
> ls(envir = environment(sfun0))
Expand Down Expand Up @@ -19649,7 +19647,7 @@ Number of Fisher Scoring iterations: 6
> cleanEx()
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed: 9.527 0.16 9.691 0 0
Time elapsed: 2.868 0.238 3.12 0 0
> grDevices::dev.off()
null device
1
Expand Down

0 comments on commit f8cf131

Please sign in to comment.