[R-sig-Geo] Distances from points to coast do not make sense.
Robert J. Hijmans
r.hijmans at gmail.com
Fri Sep 12 02:25:18 CEST 2014
The below seems to work correctly (albeit slowly).
w <- aggregate(wrld_simpl)
af = cbind(16, 13)
ng <- cbind(139, -4)
p <- rbind(af, ng)
On Thu, Sep 11, 2014 at 4:13 PM, Agus Camacho <agus.camacho at gmail.com> wrote:
> 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
> for(n in 1:dim(x1))
> 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.
> 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]]
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
More information about the R-sig-Geo