[R] creating slope angle surface

Spencer Graves spencer.graves at pdf.com
Mon Jun 28 15:59:35 CEST 2004

      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))
contour(topo.mar$x, topo.mar$y, topo.lo,
  xlab="", ylab="", levels=seq(700, 1000, 25), cex=0.7)
points(topo$x, topo$y)

      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. 

      hope this helps.  spencer graves

Barry Rowlingson wrote:

> temiz wrote:
>> hello
>> is there any way creating slope angle surface from
>> interpolated topography surface ?
>  The GRASS GIS can do calculations of slope, and aspect, and so on 
> from spot heights. Suggest you install GRASS and then maybe do data 
> transfer from R using the GRASS package from CRAN.
> Baz
> Grass: http://grass.itc.it/index.html
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html

More information about the R-help mailing list