[R-sig-Geo] Complementary areas analysis

Parra, Mauricio (AGPM) Mauricio.Parra at fao.org
Fri Oct 4 19:36:24 CEST 2013


Thanks a lot Robert, I will test .rebelo function and let you know. I could insert this function after "over" (sp package) or "extract" (raster package) functions (depending on the areas' format) in order to obtain the matrix needed for rebelo. For future dismo/raster versions, a complementary function for (directly) points and raster would be very useful. 

Thanks again,

Mauricio 

________________________________________
From: Robert J. Hijmans [r.hijmans at gmail.com]
Sent: Friday, October 04, 2013 5:39 PM
To: Parra, Mauricio (AGPM)
Cc: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] Complementary areas analysis

Maurico,

There is hidden function in the dismo package that does this. There is
a bug in it, so here it is the fixed version:

https://r-forge.r-project.org/scm/viewvc.php/pkg/dismo/R/reserves.R?view=markup&revision=518&root=dismo&sortby=date

You can copy and paste it and do

.rebelo(x)

Where x  is a matrix with sites (e.g. grid cells) as columns and
species presences/absence as rows. It will return a matrix with select
sites and number of species. I could easily expand this to work with
points and Raster objects, add more options etc. but perhaps it works
for you as is. I am not sure if I have ever tested it, so pls do so.

> set.seed(0)
> x = matrix(round(runif(1000)), nrow=100,ncol=10)
> .rebelo(x)
     Site nSpecies
[1,]    6       56
[2,]    2       23
[3,]    5       11
[4,]    8        6
[5,]    1        2
[6,]    9        2
>


Robert

On Fri, Oct 4, 2013 at 5:06 AM, Parra, Mauricio (AGPM)
<Mauricio.Parra at fao.org> wrote:
> Dear friends,
>
> I wonder if complementary areas analysis (algorithm by Rebelo 1994) is
> implemented in any R package. This analysis is useful to prioritize areas
> for in situ biodiversity conservation based on species ocurrence within
> areas/cells.  One could expect some packages which manage raster format may
> include it. However after browse on them, I couldn't find it. Anyone knows
> something about it? Any alternative?
>
> Thanks in advance,
>
> Mauricio
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>


More information about the R-sig-Geo mailing list