Skip to content
Prev 21993 / 29559 Next

Question on histograms from Raster and RasterVIS packages

Nuno,

I thought you might say that. I have used R with GRASS GIS, which
interfaces using the spgrass6 contributed package. I have analyzed some
pretty large GIS raster files, looking at radar precipitation data, and the
approach I suggested works well. The data imported into R using sp (the
basis for spgrass6) is an sp raster object. So, from the spgrass6 manual:

After loading R from the GRASS GIS terminal prompt, for example,

spear <- readRAST6(c("geology", "elevation.dem"), cat=c(TRUE, FALSE))

Try looking at this:

summary(spear)

 you can do this:

boxplot(spear$elevation.dem ~ spear$geology)

 or this, for instance :

hist(spear$elevation.dem)
meanx<-mean(spear$elevation.dem)
abline(v=meanx, col="red")

But, maybe I don't understand the problem??

Regards,
Tom
On Tue, Nov 18, 2014 at 11:21 AM, Nuno S? <nunocesardesa at gmail.com> wrote: