Error in eval(predvars, data, env) : object 'height' not found
This seems to be caused by the formula used in gstat::krige. If I change it to value~coords.x1+coords.x2 then things work, but I don't really like the result, as the height does seem to be an important component here.
Could anyone tell me what's wrong with my code can't it find the height element even if it's there? Here's the output of summary(data_sf) for my data:
Object of class SpatialPointsDataFrame
Coordinates:
min max
coords.x1 16.30809 18.25460
coords.x2 50.44010 53.33001
Is projected: FALSE
proj4string : [+proj=longlat +datum=WGS84 +no_defs]
Number of points: 5
Data attributes:
height value
Min. :122.6 Min. :2.460
1st Qu.:171.6 1st Qu.:3.560
Median :247.2 Median :4.090
Mean :219.2 Mean :3.732
3rd Qu.:270.7 3rd Qu.:4.120
Max. :284.1 Max. :4.430
Hello,
I have this function:
and I call it with this simple data:
However, I'm getting:
This seems to be caused by the formula used in
gstat::krige
. If I change it tovalue~coords.x1+coords.x2
then things work, but I don't really like the result, as the height does seem to be an important component here.Could anyone tell me what's wrong with my code can't it find the
height
element even if it's there? Here's the output ofsummary(data_sf)
for my data: