Skip to content

Commit 3dc21a9

Browse files
committed
clean up tests, CRAN doc NOTE
1 parent eaa0551 commit 3dc21a9

File tree

3 files changed

+29
-39
lines changed

3 files changed

+29
-39
lines changed

demo/00Index

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ lnsim carry out log-normal kriging, based on conditional simulation
1818
sic2004 part of sic2004 excercise; see ?sic2004
1919
sftime demo using package sftime, derived from demo(stkrige)
2020
pcb pcb North Sea data analysis as used for geoENV2004 paper; see ?pcb
21+
pcb_sf pcb North Sea data analysis as used for geoENV2004 paper, using sf, stars and ggplot2; see ?pcb
2122
fulmar analysis of Fulmaris glacialis data on Dutch part of the North Sea
2223
uisim unconditional indicator simulation, 2 and 3 category examples
2324
ugsim unconditional Gaussian simulation

man/jura.Rd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ systems.
2626
\item{Yloc}{ Y coordinate, local grid km }
2727
\item{Landuse}{ see book and below }
2828
\item{Rock}{ see book and below }
29-
\item{Cd}{ mg cadmium kg^{-1} topsoil }
30-
\item{Co}{ mg cobalt kg^{-1} topsoil }
31-
\item{Cr}{ mg chromium kg^{-1} topsoil }
32-
\item{Cu}{ mg copper kg^{-1} topsoil }
33-
\item{Ni}{ mg nickel kg^{-1} topsoil }
34-
\item{Pb}{ mg lead kg^{-1} topsoil }
35-
\item{Zn}{ mg zinc kg^{-1} topsoil }
29+
\item{Cd}{ mg cadmium \eqn{\mbox{kg}^{-1}}{kg^-1} topsoil }
30+
\item{Co}{ mg cobalt \eqn{\mbox{kg}^{-1}}{kg^-1} topsoil }
31+
\item{Cr}{ mg chromium \eqn{\mbox{kg}^{-1}}{kg^-1} topsoil }
32+
\item{Cu}{ mg copper \eqn{\mbox{kg}^{-1}}{kg^-1} topsoil }
33+
\item{Ni}{ mg nickel \eqn{\mbox{kg}^{-1}}{kg^-1} topsoil }
34+
\item{Pb}{ mg lead \eqn{\mbox{kg}^{-1}}{kg^-1} topsoil }
35+
\item{Zn}{ mg zinc \eqn{\mbox{kg}^{-1}}{kg^-1} topsoil }
3636
}
3737
The \code{data.frame} juragrid.dat only has the first four fields.
3838
In addition the \code{data.frame}s jura.pred, jura.val and jura.grid also

tests/stars.Rout.save

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
2+
R version 4.3.2 (2023-10-31) -- "Eye Holes"
33
Copyright (C) 2023 The R Foundation for Statistical Computing
44
Platform: x86_64-pc-linux-gnu (64-bit)
55

@@ -28,7 +28,7 @@ Type 'q()' to quit R.
2828

2929
> require(sp)
3030

31-
> crs = CRS("+init=epsg:28992")
31+
> crs = CRS("EPSG:28992")
3232

3333
> data("meuse")
3434

@@ -78,7 +78,7 @@ Type 'q()' to quit R.
7878

7979
> require(sp)
8080

81-
> crs = CRS("+init=epsg:28992")
81+
> crs = CRS("EPSG:28992")
8282

8383
> data("meuse")
8484

@@ -120,20 +120,14 @@ Type 'q()' to quit R.
120120
[1] "Attributes: < Component \"bbox\": Attributes: < Component \"dimnames\": Component 1: 2 string mismatches > >"
121121
[2] "Attributes: < Component \"coords\": Attributes: < Component \"dimnames\": Component 2: 2 string mismatches > >"
122122
[3] "Attributes: < Component \"coords.nrs\": Numeric: lengths (2, 0) differ >"
123-
[4] "Attributes: < Component \"proj4string\": Attributes: < Names: 1 string mismatch > >"
124-
[5] "Attributes: < Component \"proj4string\": Attributes: < Length mismatch: comparison on first 2 components > >"
125-
[6] "Attributes: < Component \"proj4string\": Attributes: < Component 2: 1 string mismatch > >"
126123
>
127124
> # 2. using stars for grid:
128125
>
129126
> suppressPackageStartupMessages(library(stars))
130127
> st = st_as_stars(meuse.grid)
131-
Warning message:
132-
In CPL_crs_from_input(x) :
133-
GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order.
134128
> st_crs(st)
135129
Coordinate Reference System:
136-
User input: +init=epsg:28992
130+
User input: Amersfoort / RD New
137131
wkt:
138132
PROJCRS["Amersfoort / RD New",
139133
BASEGEOGCRS["Amersfoort",
@@ -160,21 +154,19 @@ PROJCRS["Amersfoort / RD New",
160154
ID["EPSG",8806]],
161155
PARAMETER["False northing",463000,
162156
LENGTHUNIT["metre",1],
163-
ID["EPSG",8807]],
164-
ID["EPSG",19914]],
157+
ID["EPSG",8807]]],
165158
CS[Cartesian,2],
166-
AXIS["(E)",east,
159+
AXIS["easting (X)",east,
167160
ORDER[1],
168-
LENGTHUNIT["metre",1,
169-
ID["EPSG",9001]]],
170-
AXIS["(N)",north,
161+
LENGTHUNIT["metre",1]],
162+
AXIS["northing (Y)",north,
171163
ORDER[2],
172-
LENGTHUNIT["metre",1,
173-
ID["EPSG",9001]]],
164+
LENGTHUNIT["metre",1]],
174165
USAGE[
175-
SCOPE["unknown"],
166+
SCOPE["Engineering survey, topographic mapping."],
176167
AREA["Netherlands - onshore, including Waddenzee, Dutch Wadden Islands and 12-mile offshore coastal zone."],
177-
BBOX[50.75,3.2,53.7,7.22]]]
168+
BBOX[50.75,3.2,53.7,7.22]],
169+
ID["EPSG",28992]]
178170
>
179171
> # compare inputs:
180172
> sp = as(st, "Spatial")
@@ -183,16 +175,13 @@ PROJCRS["Amersfoort / RD New",
183175
[1] "Names: Lengths (5, 1) differ (string compare on first 1)"
184176
[2] "Names: 1 string mismatch"
185177
> all.equal(sp, meuse.grid["dist"], check.attributes = TRUE, use.names = FALSE)
186-
[1] "Names: Lengths (5, 1) differ (string compare on first 1)"
187-
[2] "Names: 1 string mismatch"
188-
[3] "Attributes: < Component 3: Names: 1 string mismatch >"
189-
[4] "Attributes: < Component 3: Length mismatch: comparison on first 1 components >"
190-
[5] "Attributes: < Component 3: Component 1: Mean relative difference: 1.08298 >"
191-
[6] "Attributes: < Component 4: Attributes: < Component 2: names for current but not for target > >"
192-
[7] "Attributes: < Component 4: Attributes: < Component 3: names for current but not for target > >"
193-
[8] "Attributes: < Component 5: Attributes: < Names: 1 string mismatch > >"
194-
[9] "Attributes: < Component 5: Attributes: < Length mismatch: comparison on first 2 components > >"
195-
[10] "Attributes: < Component 5: Attributes: < Component 2: 1 string mismatch > >"
178+
[1] "Names: Lengths (5, 1) differ (string compare on first 1)"
179+
[2] "Names: 1 string mismatch"
180+
[3] "Attributes: < Component 3: Names: 1 string mismatch >"
181+
[4] "Attributes: < Component 3: Length mismatch: comparison on first 1 components >"
182+
[5] "Attributes: < Component 3: Component 1: Mean relative difference: 1.08298 >"
183+
[6] "Attributes: < Component 4: Attributes: < Component 2: names for current but not for target > >"
184+
[7] "Attributes: < Component 4: Attributes: < Component 3: names for current but not for target > >"
196185
>
197186
> # kriging:
198187
> st_crs(st) = st_crs(meuse_sf) = NA # GDAL roundtrip messes them up!
@@ -455,7 +444,7 @@ foo 1 16.75 32.5 32.5 48.25 64
455444
dimension(s):
456445
from to offset delta refsys x/y
457446
x 1 4 10 0.5 NA [x]
458-
y 1 4 -1.11022e-16 -0.7 NA [y]
447+
y 1 4 -1.11e-16 -0.7 NA [y]
459448
time 1 4 2019-02-25 15:37:25 UTC 1 secs POSIXct
460449
> plot(s2, col = sf.colors(), axes = TRUE)
461450
> all.equal(s, s2, check.attributes = FALSE)
@@ -487,4 +476,4 @@ sample 1 5 NA NA sim1,...,sim5
487476
>
488477
> proc.time()
489478
user system elapsed
490-
6.827 3.845 6.117
479+
6.463 7.400 5.083

0 commit comments

Comments
 (0)