When I'm doing interpolation in R using gstat package, the message like this '[inverse distance weighted interpolation]' or this '[ordinary or weighted least squares prediction] ' occurs. Eg:
library('sp')
library('gstat')
data(meuse)
coordinates(meuse) = ~x + y
data(meuse.grid)
coordinates(meuse.grid) = ~x + y
gridded(meuse.grid) <- TRUE
zn.tr1 <- krige(log(zinc) ~ x + y , meuse, meuse.grid)
[ordinary or weighted least squares prediction]
How to disable that message?
Various ways exist of stopping output - the nicest being if the function has an option to suppress it. But
krige
doesn't seem to have that.capture.output
works here:The output message itself is returned and stored in
z
But if you don't print it you won't see it.