[STATSGRASS] plot of mean slope x elevation

Carlos "Guâno" Grohmann carlos.grohmann at gmail.com
Thu Jul 26 13:05:35 EDT 2007


Thanks Roger.
that did it.

Carlos

On 7/26/07, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> On Thu, 26 Jul 2007, Carlos "Guâno" Grohmann wrote:
>
> > Does anyone know how to make a plot of mean slope x elevation like
> > figures 8 and 9 of:
> > Guth, P. L. , 2006. Geomorphometry from SRTM: Comparison to NED
> > Photogrammetric Engineering and Remote Sensing, , 72, 269-278
> >
> > see figure attached
>
> Something like this:
>
> library(spgrass6)
> sf <- readRAST6(c("elevation.dem", "slope"))
> df <- as(sf, "data.frame")
> df1 <- df[order(df$elevation.dem),]
> df1$elev.factor <- cut(df1$elevation.dem, breaks=seq(1051, 1840, 10),
>    ordered_result=TRUE)
> df2 <- tapply(df1$slope, df1$elev.factor, mean, na.rm=TRUE)
> str(df2)
> plot(df2, seq(1051, 1840, 10), type="l")
>
> in spearfish - the orgiginal figure doesn't say how they binned the
> elevations, but I think that they must have done that somehow.
>
> Roger
>
>
> >
> > thanks
> > Carlos
> >
> >
>
> --
> Roger Bivand
> Economic Geography Section, Department of Economics, Norwegian School of
> Economics and Business Administration, Helleveien 30, N-5045 Bergen,
> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand at nhh.no
>


-- 
+-----------------------------------------------------------+
              Carlos Henrique Grohmann - Guano
  Visiting Researcher at Kingston University London - UK
  Geologist M.Sc  - Doctorate Student at IGc-USP - Brazil
Linux User #89721  - carlos dot grohmann at gmail dot com
+-----------------------------------------------------------+
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke

Can't stop the signal.




More information about the grass-stats mailing list