[STATSGRASS] compare several maps - starting with the easier stuff..

Carlos "Guâno" Grohmann carlos.grohmann at gmail.com
Thu Aug 9 17:47:32 EDT 2007


Well, continuing with my quest of comparing multiple maps, I though I
could do with some graphics first. So I would have a visual idea of
how things are going.
This is my idea: a simple XY plot, with neighborhood size (used to
calculate surface roughness) in the X-axis and mean values on the
Y-axis, so I'll end up with three curves, one for each method.
The problem is that each method returns a different range of values,
so how is there a way to scale all the values to a common range (say,
0-1) in R? so I don't need to use r.recode in all my maps?

I found the function scale(),  but it always returns a matrix, and I
am importing the rasters in a dataframe:

maps <-readRAST6(c("k3","k5","k7","k9","k11","k13","k15","k17","k19","k21","k31","k51","k101"));
mapsdf <- as(maps, "data.frame");
mapsdf=mapsdf[,-14]
mapsdf=mapsdf[,-14]
plot(c(3,5,7,9,11,13,15,17,19,21,31,51,101),mean(mapsdf), type="b")

I pretty sure there is a better way to do this...

cheers

Carlos

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