That's perfect!
Thank you very much for your help!

2008/12/17 Kamran Safi <Kamran.Safi@ioz.ac.uk>

>  Hi,
>
>
>
> Of course. Hope this works for you. I didn't check it, just from memory, so
> if it shouldn't work, just give another shout.
>
>
>
> temp <- as.matrix(<your distance matrix>)
>
> quantile(temp[lower.tri(temp)], probs=c(0.25, 0.5, 0.75))
>
>
>
> Kamran
>
>
>
> ------------------------
>
> Kamran Safi
>
>
>
> Postdoctoral Research Fellow
>
> Institute of Zoology
>
> Zoological Society of London
>
> Regent's Park
>
> London NW1 4RY
>
>
>
> http://www.zoo.cam.ac.uk/ioz/people/safi.htm
>
>
>
> http://spatialr.googlepages.com
>
> http://asapi.wetpaint.com
>
>
>  ------------------------------
>
> *From:* Annachiara Saguatti [mailto:annachiara.saguatti@gmail.com]
> *Sent:* 17 December 2008 16:39
> *To:* Kamran Safi; r-sig-geo@stat.math.ethz.ch
> *Subject:* Re: [R-sig-Geo] calculate distance from coordinates
>
>
>
> That sounds really close to what I'm looking for. I have a perplexity,
> though. With the function spDistsN1 I can calculate the distance between
> each point and all the others, and by following the guidelines on that
> website I have created a 196x196 matrix containing the distances between all
> pairs of coordinates. Nevertheless, when I give the input summary( ), I get
> 196 different summaries whereas I need only one summary in order to know
> which the quartiles of the distribution are. Can you help me with this again
> please?
>
> Thank you very much,
> Annachiara Saguatti
>
>  2008/12/17 Kamran Safi <Kamran.Safi@ioz.ac.uk>
>
>  Hi Annachiara,
>
> This is what you are looking for, I think:
>
> http://help.nceas.ucsb.edu/R:_Spatial
>
> Somewhere down at the middle...
>
>
> Kamran
>
>
> ------------------------
> Kamran Safi
>
> Postdoctoral Research Fellow
> Institute of Zoology
> Zoological Society of London
> Regent's Park
> London NW1 4RY
>
> http://www.zoo.cam.ac.uk/ioz/people/safi.htm
>
> http://spatialr.googlepages.com
> http://asapi.wetpaint.com
>
>
>
> -----Original Message-----
> From: r-sig-geo-bounces@stat.math.ethz.ch
> [mailto:r-sig-geo-bounces@stat.math.ethz.ch] On Behalf Of Annachiara
> Saguatti
> Sent: 17 December 2008 13:59
> To: r-sig-geo@stat.math.ethz.ch
> Subject: [R-sig-Geo] calculate distance from coordinates
>
> Hello,
>
> I have a question which should be very simple. I have a list of long-lat
> coordinates of 196 sites and I need to calculate the great circle
> distance
> (in miles?) between all of them. I can't find the right function
> though... I
> need this in order to calculate the quartiles of the distances between
> all
> the regions and set a cut-off distance to create a neighbor list. I have
> tried the "dist" function but the output doesn't seem to be what I
> expected,
> because I cannot recognize the numbers I get as the distance between the
> sites: they're too low (max 44.51000, but the sites are the European
> regional capitals...).
>
> Does anyone have a hint on this?
>
> Thank you very much,
> Annachiara Saguatti
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
> This message has been scanned for viruses by MailControl -
> www.mailcontrol.com
>
> Click
> https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg== QY9pqEtBGg0LlGvnh1B<https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==>!oYVi7e7dvuP24!X9jTmmkEZ8A==
>  to report this email as
> spam.
>
>
> The Zoological Society of London is incorporated by Royal Charter
> Principal Office England. Company Number RC000749
> Registered address:
> Regent's Park, London, England NW1 4RY
> Registered Charity in England and Wales no. 208728
>
> _________________________________________________________________________
> This e-mail has been sent in confidence to the named addressee(s).
> If you are not the intended recipient, you must not disclose or distribute
> it in any form, and you are asked to contact the sender immediately.
> Views or opinions expressed in this communication may not be those
> of The Zoological Society of London and, therefore, The Zoological
> Society of London does not accept legal responsibility for the contents
> of this message. The recipient(s) must be aware that e-mail is not a
> secure communication medium and that the contents of this mail may
> have been altered by a third party in transit.
> If you have any issues regarding this mail please contact:
> administrator@zsl.org.
> ___________________________________________________________________________
>
>
>
> This message has been scanned for viruses by MailControl, a service from
> BlackSpider Technologies.
>
>
>

	[[alternative HTML version deleted]]


