R Under development (unstable) (2025-08-26 r88710 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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. 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. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > set.seed(1) > library(intamapInteractive) Loading required package: intamap Loading required package: sp > > data(meuse) > observations = data.frame(x = meuse$x,y = meuse$y,value = log(meuse$zinc)) > coordinates(observations) = ~x+y > pBoundaries = spsample(observations, 10, "regular",bb = bbox(observations) + + matrix(c(-400,-400,400,400),ncol=2),offset=c(0,0)) > gridded(pBoundaries) = TRUE > cs = pBoundaries@grid@cellsize[1]/2 > > Srl = list() > nb = dim(coordinates(pBoundaries))[1] > for (i in 1:nb) { + pt1 = coordinates(pBoundaries)[i,] + x1 = pt1[1]-cs + x2 = pt1[1]+cs + y1 = pt1[2]-cs + y2 = pt1[2]+cs + + boun = data.frame(x=c(x1,x2,x2,x1,x1),y=c(y1,y1,y2,y2,y1)) + coordinates(boun) = ~x+y + boun = Polygon(boun) + Srl[[i]] = Polygons(list(boun),ID = as.character(i)) + } > pBoundaries = SpatialPolygonsDataFrame(SpatialPolygons(Srl), + data = data.frame(ID=c(1:nb))) > observations$ID = over(observations, geometry(pBoundaries)) > blines = findBoundaryLines(pBoundaries, regCode = "ID") > rb = findRegionalBias(observations, blines, value~1, regCode = "ID") interpolating border between 12 9 [using ordinary kriging] [using ordinary kriging] interpolating border between 9 8 [using ordinary kriging] [using ordinary kriging] interpolating border between 8 5 [using ordinary kriging] [using ordinary kriging] interpolating border between 5 2 [using ordinary kriging] [using ordinary kriging] Warning messages: 1: In validityMethod(object) : duplicate rownames are interpreted by rgeos as MultiPoints; use SpatialMultiPoints to define these; in future sp versions this warning will become an error 2: In validityMethod(object) : duplicate rownames are interpreted by rgeos as MultiPoints; use SpatialMultiPoints to define these; in future sp versions this warning will become an error 3: In validityMethod(object) : duplicate rownames are interpreted by rgeos as MultiPoints; use SpatialMultiPoints to define these; in future sp versions this warning will become an error 4: In validityMethod(object) : duplicate rownames are interpreted by rgeos as MultiPoints; use SpatialMultiPoints to define these; in future sp versions this warning will become an error 5: In validityMethod(object) : duplicate rownames are interpreted by rgeos as MultiPoints; use SpatialMultiPoints to define these; in future sp versions this warning will become an error 6: In validityMethod(object) : duplicate rownames are interpreted by rgeos as MultiPoints; use SpatialMultiPoints to define these; in future sp versions this warning will become an error 7: In validityMethod(object) : duplicate rownames are interpreted by rgeos as MultiPoints; use SpatialMultiPoints to define these; in future sp versions this warning will become an error 8: In validityMethod(object) : duplicate rownames are interpreted by rgeos as MultiPoints; use SpatialMultiPoints to define these; in future sp versions this warning will become an error > rb$regionalBias ID ols ols.std ols.t.value ols.p wls wls.std x1 12 -0.445225055 0.13265188 -3.35634177 0.07846453 -0.4389124287 0.10234795 x2 9 -0.388959039 0.08466967 -4.59384131 0.04426334 -0.3826464120 0.06841482 x3 8 -0.011536711 0.08466967 -0.13625553 0.90409689 -0.0047292281 0.06982007 x4 5 -0.006451925 0.06077086 -0.10616808 0.92513849 -0.0001392988 0.05181279 x5 4 0.086939382 0.09437628 0.92119954 0.45419524 0.0680015020 0.08180645 x6 6 -0.001367140 0.08466967 -0.01614675 0.98858327 0.0044506305 0.06982007 x7 2 0.253382854 0.09437628 2.68481513 0.11523842 0.2512786455 0.09290803 x8 1 0.513217634 0.10317369 4.97430741 0.03811844 0.5026965897 0.09983893 wls.t.value wls.p x1 -4.288433898 0.05030747 x2 -5.593034149 0.03051173 x3 -0.067734508 0.95215931 x4 -0.002688503 0.99809895 x5 0.831248624 0.49327053 x6 0.063744286 0.95497170 x7 2.704595503 0.11383479 x8 5.035075691 0.03725436 > > obs2 = removeRegionalBias(observations, rb, value~1, regCode = "ID") > > summary(obs2) Object of class SpatialPointsDataFrame Coordinates: min max x 178605 181390 y 329714 333611 Is projected: NA proj4string : [NA] Number of points: 155 Data attributes: value ID Min. :4.723 Min. : 1.000 1st Qu.:5.407 1st Qu.: 5.000 Median :6.025 Median : 8.000 Mean :6.043 Mean : 7.735 3rd Qu.:6.569 3rd Qu.: 9.000 Max. :7.665 Max. :12.000 > > proc.time() user system elapsed 3.50 0.39 3.84