Skip to content

Commit bb5ed0d

Browse files
committed
tidy
1 parent f5926e8 commit bb5ed0d

File tree

5 files changed

+35
-23
lines changed

5 files changed

+35
-23
lines changed

inst/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2024-09-03 edzer <[email protected]>
2+
3+
* inst/ChangeLog, tests/stars.Rout.save: clean test output
4+
15
2024-08-23 edzer <[email protected]>
26

37
* inst/ChangeLog, src/Makevars, src/mtrx.c, src/s.c, src/userio.c:

tests/stars.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ if (require(raster, quietly = TRUE)) {
5454

5555
suppressPackageStartupMessages(library(spacetime))
5656

57-
Sys.setenv(TZ="")
5857
tm = as.POSIXct("2019-02-25 15:37:24 CET")
5958
n = 4
6059
s = stars:::st_stars(list(foo = array(1:(n^3), rep(n,3))),
@@ -85,4 +84,6 @@ meuse_sf = st_as_sf(meuse, coords = c("x", "y"))
8584
g = gstat(NULL, "zinc", zinc~1, meuse_sf, model = vgm(1, "Exp", 300), nmax = 10)
8685
g = gstat(g, "lead", lead~1, meuse_sf, model = vgm(1, "Exp", 300), nmax = 10, fill.cross = TRUE)
8786
set.seed(123)
87+
## IGNORE_RDIFF_BEGIN
8888
(p = predict(g, meuse.grid, nsim = 5))
89+
## IGNORE_RDIFF_END

tests/stars.Rout.save

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ band
240240
>
241241
> suppressPackageStartupMessages(library(spacetime))
242242
>
243-
> Sys.setenv(TZ="")
244243
> tm = as.POSIXct("2019-02-25 15:37:24 CET")
245244
> n = 4
246245
> s = stars:::st_stars(list(foo = array(1:(n^3), rep(n,3))),
@@ -256,10 +255,10 @@ attribute(s):
256255
Min. 1st Qu. Median Mean 3rd Qu. Max.
257256
foo 1 16.75 32.5 32.5 48.25 64
258257
dimension(s):
259-
from to offset delta refsys x/y
260-
x 1 4 10 0.5 NA [x]
261-
y 1 4 0 -0.7 NA [y]
262-
time 1 4 2019-02-25 15:37:25 Universal 1 secs POSIXct
258+
from to offset delta refsys x/y
259+
x 1 4 10 0.5 NA [x]
260+
y 1 4 0 -0.7 NA [y]
261+
time 1 4 2019-02-25 15:37:25 UTC 1 secs POSIXct
263262
>
264263
> as.data.frame(s)
265264
x y time foo
@@ -431,8 +430,8 @@ Slot "time":
431430
2019-02-25 15:37:28 4
432431

433432
Slot "endTime":
434-
[1] "2019-02-25 15:37:26 Universal" "2019-02-25 15:37:27 Universal"
435-
[3] "2019-02-25 15:37:28 Universal" "2019-02-25 15:37:29 Universal"
433+
[1] "2019-02-25 15:37:26 UTC" "2019-02-25 15:37:27 UTC"
434+
[3] "2019-02-25 15:37:28 UTC" "2019-02-25 15:37:29 UTC"
436435

437436
> stplot(s.stfdf, scales = list(draw = TRUE))
438437
>
@@ -442,10 +441,10 @@ attribute(s):
442441
Min. 1st Qu. Median Mean 3rd Qu. Max.
443442
foo 1 16.75 32.5 32.5 48.25 64
444443
dimension(s):
445-
from to offset delta refsys x/y
446-
x 1 4 10 0.5 NA [x]
447-
y 1 4 -1.11e-16 -0.7 NA [y]
448-
time 1 4 2019-02-25 15:37:25 Universal 1 secs POSIXct
444+
from to offset delta refsys x/y
445+
x 1 4 10 0.5 NA [x]
446+
y 1 4 -1.11e-16 -0.7 NA [y]
447+
time 1 4 2019-02-25 15:37:25 UTC 1 secs POSIXct
449448
> plot(s2, col = sf.colors(), axes = TRUE)
450449
> all.equal(s, s2, check.attributes = FALSE)
451450
[1] TRUE
@@ -460,6 +459,7 @@ time 1 4 2019-02-25 15:37:25 Universal 1 secs POSIXct
460459
> g = gstat(NULL, "zinc", zinc~1, meuse_sf, model = vgm(1, "Exp", 300), nmax = 10)
461460
> g = gstat(g, "lead", lead~1, meuse_sf, model = vgm(1, "Exp", 300), nmax = 10, fill.cross = TRUE)
462461
> set.seed(123)
462+
> ## IGNORE_RDIFF_BEGIN
463463
> (p = predict(g, meuse.grid, nsim = 5))
464464
drawing 5 multivariate GLS realisations of beta...
465465
[using conditional Gaussian simulation]
@@ -473,7 +473,8 @@ dimension(s):
473473
x 1 78 178440 40 NULL [x]
474474
y 1 104 333760 -40 NULL [y]
475475
sample 1 5 NA NA sim1,...,sim5
476+
> ## IGNORE_RDIFF_END
476477
>
477478
> proc.time()
478479
user system elapsed
479-
5.792 7.819 4.934
480+
5.561 8.100 4.738

tests/vdist.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ mg = meuse.grid
1010
gridded(mg) = FALSE
1111
mg= mg[1500,]
1212
krige(log(zinc)~1,meuse,mg,vgm(1, "Exp", 300, anis=c(0,0.01)),
13-
vdist=FALSE, maxdist=1000,nmax=10)
13+
vdist=FALSE, maxdist=1000, nmax = 9)
14+
15+
## IGNORE_RDIFF_BEGIN
1416
krige(log(zinc)~1,meuse,mg,vgm(1, "Exp", 300, anis=c(0,0.01)),
15-
vdist=TRUE, maxdist=1000,nmax=10)
17+
vdist=TRUE, maxdist=1000, nmax = 9)
18+
## IGNORE_RDIFF_END

tests/vdist.Rout.save

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
R version 3.0.1 (2013-05-16) -- "Good Sport"
3-
Copyright (C) 2013 The R Foundation for Statistical Computing
4-
Platform: x86_64-pc-linux-gnu (64-bit)
2+
R version 4.4.1 (2024-06-14) -- "Race for Your Life"
3+
Copyright (C) 2024 The R Foundation for Statistical Computing
4+
Platform: x86_64-pc-linux-gnu
55

66
R is free software and comes with ABSOLUTELY NO WARRANTY.
77
You are welcome to redistribute it under certain conditions.
@@ -27,16 +27,19 @@ Type 'q()' to quit R.
2727
> gridded(mg) = FALSE
2828
> mg= mg[1500,]
2929
> krige(log(zinc)~1,meuse,mg,vgm(1, "Exp", 300, anis=c(0,0.01)),
30-
+ vdist=FALSE, maxdist=1000,nmax=10)
30+
+ vdist=FALSE, maxdist=1000, nmax = 9)
3131
[using ordinary kriging]
3232
coordinates var1.pred var1.var
33-
1500 (180260, 331300) 5.007376 1.102622
33+
1500 (180260, 331300) 5.024413 1.114475
34+
>
35+
> ## IGNORE_RDIFF_BEGIN
3436
> krige(log(zinc)~1,meuse,mg,vgm(1, "Exp", 300, anis=c(0,0.01)),
35-
+ vdist=TRUE, maxdist=1000,nmax=10)
37+
+ vdist=TRUE, maxdist=1000, nmax = 9)
3638
[using ordinary kriging]
3739
coordinates var1.pred var1.var
38-
1500 (180260, 331300) 5.50671 1.100095
40+
1500 (180260, 331300) 5.568531 1.112945
41+
> ## IGNORE_RDIFF_END
3942
>
4043
> proc.time()
4144
user system elapsed
42-
1.308 0.052 1.370
45+
0.593 1.446 0.532

0 commit comments

Comments
 (0)