
Hi all

I am trying to determine the distances between  two datasets of x and y
points. The number of points in dataset One is very small i.e. perhaps
5-10. The number of points in dataset Two is likely to be very large
i.e. 20,000-30,000. My initial approach was to append the first dataset
to the second and then carry out the calculation:

dists <- as.matrix(dist(gis data from 2 * datasets)) 

However, the memory of the computer is not sufficient. A lot of
calculations carried out in this situation are unnecessary as I only
want approx 5 * 20,000 calculations versus 20,000 *20,000. 

x <- c(2660156,2663703,2658165,2659303,2661531,2660914)
y <- c(6476767,6475013,6475487,6479659,6477004,6476388)
data2<-cbind(x,y)

x <- c(266500,2611111)
y <- c(6478767,6485013)
data1<-cbind(x,y)

Any suggestions on how to do this would be appreciated.

Regards

Andrew

Phone 04 894 5600 Fax 04 894 4973 Mobile 029 894 5611 Postal address: 
Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St 
Upper Hutt



########################################################################
This email message and any attachment(s) is intended solely for the
addressee(s) named above. The information it contains is confidential
and may be legally privileged.  Unauthorised use of the message, or the
information it contains, may be unlawful. If you have received this
message by mistake please call the sender immediately on 64 4 8940100
or notify us by return email and erase the original message and
attachments. Thank you.

The Ministry of Agriculture and Forestry accepts no responsibility for
changes made to this email or to any attachments after transmission from
the office.
########################################################################

	[[alternative HTML version deleted]]

