[GRASS-dev] r.series: skewness tested

Markus Neteler neteler at osgeo.org
Tue Jun 3 16:17:14 EDT 2008


Glynn,

I have seen the r.series extension (much welcome) and tested it after
backport with:

GRASS 6.4.svn (nc_spm_07):~ > g.region n=230000 s=214000 w=628000
e=646000 nsres=2000 ewres=2000 -p

# numbers taken from
http://www.nabble.com/-R--problems-with-garchFit-td7497741.html#a7501094
i=0
for n in `cat numbers.asc` ; do
   i=`expr $i + 1`
   r.mapcalc "map$i=double($n)"
done
r.series in=`g.mlist type=rast pat="map*" sep=','` out=skew meth=skewness
r.info -r skew
min=-0.639793
max=-0.639793

R
> mynum <- read.csv("numbers.asc", header=FALSE)
> str(mynum)
'data.frame':   202 obs. of  1 variable:
 $ V1: num   0.01071  0.02384  0.01709  0.01387 -0.00210 ...
> skewness(mynum$V1)
[1] -0.6371108

Is the subtle difference a precision problem somewhere?

Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: numbers.asc.gz
Type: application/x-gzip
Size: 1902 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20080603/1114c8b5/numbers.asc.gz


More information about the grass-dev mailing list