# Estimation of values for unsampled points

I want to measure biomass on a coastal mudflat. I can only access points inside the polygon. Are there any methods available that would allow me to estimate values of the points outside of the polygon, based on the values of points inside the polygon?

``````set.seed(5)
x <- rnorm(50, -1.841, 0.01)
set.seed(50)
y <- rnorm(50, 55.663, 0.01)
xy <- data.frame(x,y, values=rnorm(50))
coordinates(xy) <- c("x", "y")
proj4string(xy) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84")
plot(xy)

makePolygons <- function(coordsx, coordsy){

coords <- matrix(c(c(coordsx, coordsy)), ncol=2)
p <- Polygon(coords)
p <- Polygons(list(p), ID = "p")
myPoly <- SpatialPolygons(list(p))
spdf = SpatialPolygonsDataFrame(myPoly, data.frame(variable1 = c(2),
variable2 = c(3), row.names = c("p")))
proj4string(spdf) <- CRS("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")

print("polygon is in longlat!!!")

spdf

}

myPoly <- makePolygons(coordsx=c(-1.841960, -1.843464, -1.888623, -1.841960),
coordsy=c(55.633696, 55.68178, 55.63841, 55.633696))