compare several maps - starting with the easier stuff..

2 messages Options
Embed this post
Permalink
Carlos Grohmann-2

compare several maps - starting with the easier stuff..

Reply Threaded More More options
Print post
Permalink
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.

_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass
Jarosław Jasiewicz

Re: compare several maps - starting with the easier stuff..

Reply Threaded More More options
Print post
Permalink
Carlos "Guâno" Grohmann wrote:

> 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
>
>  
in R?
plot(x=map$scale, y=map$mean, xlim=c(0,1).....) for all plots
or write the loop if there is lots of plots
I use that method to create multiple cross-sections from DEM

Jarek

_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass