[GRASS-user] Grass Script- Implementing a Quadratic Mahalanobis Distance

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Sat Oct 16 13:45:50 EDT 2010


Daniel Victoria wrote:

> R has a command to calculate the Mahalanobis distance [1], so I
> believe it's just a matter of getting the grass data into R in the
> correct way and using the already R built in tools in R.
> Unfortunately, this is as far as I can help, not being an expert in R
> myself....

Sorry that I did not take the time to search better within R. So, it seems to 
be very easy then using the R function "mahalanobis()". As Daniel notes, it's 
just a matter of correctly loading the data in R.

@Pedro: If you have difficulties to get started with R, check the wiki [2]. 
There are examples. Myself I calculated separability measures this way (grass 
raster samples -> R -> separability measures -> exported as csv).

Cheers, Nikos

> [1] -
> http://stat.ethz.ch/R-manual/R-devel/library/stats/html/mahalanobis.html
[2] <http://grass.osgeo.org/wiki/R_statistics>


More information about the grass-user mailing list