# NOT RUN {
# create 5x5 square
poly <- raster::rasterToPolygons(raster::raster(nrows = 5, ncols = 5,
xmn = -1.25, xmx = 1.25,
ymn = -1.25, ymx = 1.25,
res = 0.5,
crs = "+proj=longlat +datum=WGS84"))
df <- data.frame("x" = stats::rnorm(n = 25))
dt <- sp::SpatialPolygonsDataFrame(poly, df)
knots <- expand.grid(c(-0.75,0.0,0.75),c(-0.75,0.0,0.75))
OCbasis(spatialData = dt,
gbf = 'bisquare',
knots = knots,
nw = 200L,
nCore = 1L)
OCbasis(spatialData = dt,
gbf = 'gaussian',
knots = knots,
nw = 200L,
nCore = 1L)
# }
Run the code above in your browser using DataLab