[R] uncorrect image dimension

Lecca Paola lecca at science.unitn.it
Fri Apr 5 11:02:21 CEST 2002


Hi !

I'm performing kriging on a squared grid 12cm x 12cm. Each cell of the
grid is 0.5cm x 0.5cm.

I'm using sgeostat package "krige" funtion. When I plot the kriging
predictions the image occupies only the upper corner of my grid. I don't
understand my error.

The code of my script is

grid <- list(x=seq(-6,6,by=0.5),y=seq(-6,6,by=0.5))

grid$xr <- range(grid$x)
grid$xs <- grid$xr[2] - grid$xr[1]
grid$yr <- range(grid$y)
grid$ys <- grid$yr[2] - grid$yr[1]
grid$max <- max(grid$xs, grid$ys)
grid$xy <- data.frame(cbind(c(matrix(grid$x, length(grid$x),
length(grid$y))), c(matrix(grid$y, length(grid$x), length(grid$y),
byrow=T))))

colnames(grid$xy) <- c("x", "y")
grid$point <- point(grid$xy)

grid$krige <-krige(grid$point, dbpoint, variomd, at="Counts")

Thanks,
Paola.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list