The answer below solved my fist question, so I edit my question as follows:
I have a shapefile given with the attributes lat, lon, elevation and temperature.
So far I have a script that interpolates only the temperature data:
#read shapefile: shape <- readOGR("C:/Users.../Testarea.gdb", "temperature_data") #grid shapefile: shape.grid <- spsample(shape, type = "regular", offset = (c1,1)) gridded(shape.grid) <- TRUE #kriging: test <- krige(Temperatur~1, shape, shape.grid) spplot(test[])
Now my problem is that I should also need to consider the elevation, since the temperature is often dependant on this parameter. How can I do this?