[R-sig-Geo] Distances from points to coast do not make sense.

Agus Camacho agus.camacho at gmail.com
Fri Sep 12 01:13:13 CEST 2014


I have two species, one is widespread in Africa (varanus niloticus) and the
other is distributed across a region of new Guinea (Varanus prasinus). I
calculated the mean distance to coast of their respective geographic
records using the following script:

x1 is a dataframe with two columns: Longitude and Latitude of geographic
records

meandist=rep(0,length(levels(x$Species)))
distance=rep(NA,dim(x1)[1])

for(n in 1:dim(x1)[1])
{
 distance[n]=(dist2Line(cbind(x1[n,1],x1[n,2]),LAcl,distfun=distVincentyEllipsoid)/1000)[1]
}
meandist=mean(distance)

The problem is that geographic records from the african species is giving
me shorter distances to the coast (mean=6677) than the species from new
guinea(mean=12417). I already plotted the species records and checked there
are not bizarre records. I can send the records for anyone insterested.

Thanks in advance.
Agus



-- 
Agustín Camacho Guerrero.
Doutor em Zoologia.
Laboratório de Herpetologia, Departamento de Zoologia, Instituto de
Biociências, USP.
Rua do Matão, trav. 14, nº 321, Cidade Universitária,
São Paulo - SP, CEP: 05508-090, Brasil.

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list