Displaying 1 result from an estimated 1 matches for "gatherdata".
Did you mean:
weatherdata
2006 Jan 11
2
Levelplot not working from file
I am trying to use the levelplot function from a command file.
Here is the code:
library(sp)
library(gstat)
library(lattice)
gatherData <- read.table("~/gather.txt", header = TRUE)
grd = makegrid(gatherData$x, gatherData$y, cell.size = 5)
k <- krige(z~x+y, ~x+y, data = gatherData, newdata = grd, nmax = 5)
levelplot(var1.pred~x+y, k, aspect = mapasp(k), main = "Predicted 5m")
It executes fine (it plots up...