[R] uncorrect image dimension
lecca at science.unitn.it
Fri Apr 5 11:02:21 CEST 2002
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 - grid$xr
grid$yr <- range(grid$y)
grid$ys <- grid$yr - grid$yr
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),
colnames(grid$xy) <- c("x", "y")
grid$point <- point(grid$xy)
grid$krige <-krige(grid$point, dbpoint, variomd, at="Counts")
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