[R] creating slope angle surface

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jun 28 16:16:04 CEST 2004


On Mon, 28 Jun 2004, Spencer Graves wrote:

>       Another alternative might follow an example in Venables and Ripley
> (2002, p. 76-77) Modern Applied Statistics with S (Springer):
>
> topo.loess <- loess(z~x*y, topo, degree=2, span=0.25)
> topo.mar <- list(x=seq(0, 6.5, .2), y=seq(0, 6.5, .2))
> topo.lo <- predict(topo.loess, expand.grid(topo.mar))
> par(pty="s")
> contour(topo.mar$x, topo.mar$y, topo.lo,
>   xlab="", ylab="", levels=seq(700, 1000, 25), cex=0.7)
> points(topo$x, topo$y)
> par(pty="m")
>
>       They also provide a solution using contourplot.  However, in R
> 1.9.1 alpha, I got an error on that, 'couldn't find function "mat2tr"';
> it should be fairly easy to work around that error if it has not already
> been fixed in R 1.9.1, which I have not yet installed.

You do need to consult the R scripts for R differences -- MASS4 p.12.

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list