[R] calc dist AB for B at levels of A

Melanie Ann Harsch harschm at lincoln.ac.nz
Wed Nov 14 22:49:15 CET 2007


I have a question that I have been trying to figure out and I imagine 
there is a very simple answer to it.

I am trying to use the distAB function in the clim.pact package
I have a dataframe with 4 columns in which A is ref pt and B is site
1. longitude of A
2. Latitude of A
3. longitude of B
4. Latitude of B

Problem is the columns are unequal in length 
column 1 and 2 are length=29 and 3 and 4 length=53

What I want to do is create a matrix which are filled with values of 
distAB for B (site) at all levels of A (reference points)

Any ideas?
Melanie



More information about the R-help mailing list