[R] Contents of R-help digest.-contouring

Duncan Murdoch dmurdoch at pair.com
Mon Jul 21 20:49:01 CEST 2003


On Mon, 21 Jul 2003 13:45:39 -0400, "john lewis"
<john.lewis at sympatico.ca> wrote :

>R- Users:
>
>Can someone indicate what I am during wrong? This is a script essentially from 
>
>Venerable & Ripley's text on interpolating a surface with loess function but I can not get it to run.

That's Venables...

>topo.lo <- predict(topo.loess, expand.grid(topo.mar), se=T)
>
>lo.1 <- as.data.frame(topo.lo)
>
>lo.2 <- as.matrix(lo.1$fit)

The problem is here.  lo.2 ends up being a matrix with dimensions 4356
by 1, because you didn't say what dimensions to use.  Try this
instead:

lo.2 <- matrix(lo.1$fit, length(topo.mar$x), length(topo.mar$y))


Duncan Murdoch




More information about the R-help mailing list