Skip to content
Prev 9966 / 29559 Next

Plot mean of variable on a map

Hi,

loessmodel <- loess(price ~ lat*lon, options) # fiddle with the options
locations <- expand.grid() # to make a prediction grid
averageprice <- predict(loessmodel, newdata = locations) # not a grid
locations$averageprice <- averageprice # to maka it a grid again

Or something along those lines. Of course there are also "better" ways to interpolate.

Hope this helps,

Arien
Aleksandr Andreev wrote: