Next try

On Wednesday, May 15, 2013, Rainer M Krug wrote:

>
>
> On Wednesday, May 15, 2013, ping yang wrote:
>
>> Hi Rainer,
>>
>> Is the Earth Movers Distance used to compare two distributions (e.g. the
>> result of hist function) or two exactly raster grids?
>>
>
> It compares the actual raster grids, but it can also be used to compare
> histograms.
>
>
>> actually when I compared two raster grids(I pasted my script here):
>>
>> b <-raster(paste("tavg.3MIN.1981-2010_yearmean_NE30mask.nc
>> ",sep=""),varname='tavg')
>> a <-raster(paste("prcp.3MIN.1981-2010_yearmean_NE.nc
>> ",set=""),varname='prcp')
>> a <- as.matrix(a)
>> b <- as.matrix(b)
>> emd2d(a, b)
>>
>
> Depending on the size of the rasters, that is possible. EMD is an
> optimization process and therefore takes quite a few calculations. You
> could try both packages which provide the EMD.
>
> Cheers,
>
> Rainer
>
>
>> This function runs forever to finish (and it used up the memory).
>>
>> Thanks,
>>
>> Ping
>>
>> --
>> Ping Yang, Ph.D.
>> CUNY Environmental Crossroads Initiative
>> The City College of New York - CUNY
>>
>>
>
> --
> NEW GERMAN FAX NUMBER!!!
>
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Natural Sciences Building
> Office Suite 2039
> Stellenbosch University
> Main Campus, Merriman Avenue
> Stellenbosch
> South Africa
>
> Cell:           +27 - (0)83 9479 042
> Fax:            +27 - (0)86 516 2782
> Fax:            +49 - (0)321 2125 2244
> email:          Rainer@krugs.de <javascript:_e({}, 'cvml',
> 'Rainer@krugs.de');>
>
> Skype:          RMkrug
> Google:         R.M.Krug@gmail.com <javascript:_e({}, 'cvml',
> 'R.M.Krug@gmail.com');>
>
>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax (F):       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

	[[alternative HTML version deleted]]

