Tom_R wrote: > How do I use nncross to measure min distances between > point patterns i,j, ENSURING each point in pattern i > is only connected to a single partner point in pattern j ? > I do realise that there are many possible pairings > between the i-j point pairs... perhaps some average > min distance for many pairings would be better. > Alternatively pairings could be randomly assigned. > > Basically, i am tracking a population of moving objects > over time, and want to indirectly estimate the collective > movement- which might be better estimated by telling > nncross to randomly assign (somehow) paired nearest > neighbour distances ; 1-to-1 rather than many-to-one.
See the function 'pppdist' in the 'spatstat' package. This function determines the optimal pairing between two point patterns X and Y, and (optionally) returns the optimized (average or maximum) distance. There are related functions pppmatching and matchingdist which will create other kinds of pairings and measure the associated distances.
These functions were written by Dominic Schuhmacher. Adrian Baddeley ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.