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

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jul 21 20:57:54 CEST 2003


On Mon, 21 Jul 2003, Duncan Murdoch wrote:

> 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))

which is rather close to what the purported source actually has, including
in the on-line scripts installed with the MASS package under R.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list