[R-sig-eco] diversity zones
Marcelino de la Cruz
marcelino.delacruz at upm.es
Mon May 4 19:21:52 CEST 2015
Hi Katia,
Using some functions from spatstat you could get some maps.
For this, you should format your data as a ppp object of spatstat.
See my example below:
# data for my example
library(spatstat)
data(lansing)
plot(lansing)
# get richnes for each tree within a circle with R=0.05
# first tabulate number of neighbour trees for each species
lansing.r <- marktable(lansing, R=0.05)
# now summarize richness.
#This would be equivalent to your vector of richness for each tree
lansing.rr <- apply(lansing.r, 1,function(x) sum(x>0))
# Add richness as a mark to the lansing ppp, maintaining the original
species mark
lansing$marks=data.frame(sp=lansing$marks, richness=lansing.rr)
plot(lansing)
# get a ppp for each species ("split" the ppp)
lansing.sp=split(lansing, f="sp")
lansing.sp
# now remove the sp marks and let only the richness one
lansing.sp<- lapply(lansing.sp, function(x){x=x;
x$marks=x$marks$richness; return(x)})
# get "maps" of richness around trees
# with Smooth.ppp (Kernel smoothing)
plot(Smooth(lansing.sp[["blackoak"]]))
points(lansing.sp[["blackoak"]])
# with idw (inverse distance weighting)
dev.new()
plot(idw(lansing.sp[["blackoak"]]))
points(lansing.sp[["blackoak"]])
See the help page of Smooth.ppp and idw to see how to fine tuning
"bandwith", weighting distance etc.
HTH,
MArcelino
El 04/05/2015 a las 16:19, Katia escribió:
>
>
>> De: Kátia Emidio
>> Dear all,
>>
>> I am trying to create a diversiy zones based on tree species distribution, from neighboor analysis. I identify the 20th neighboor from each one of my tree species, and counted the richness associated to each one. I also have the associated distance to each kth tree... So, my study area is 100x100 m..As I want zone areas, how can I divide this area, so it can represent the richnees found? From 265 species, I am interested to do this for 30 one, generating maps for each one.
>>
>> I though to use the Dirichlet tessellation, but it is a little hard to me, to imagine how to do it...
>>
>> Any tips is welcome!!!
>>
>>
>> --
>> Kátia Emídio da Silva DSc
>> Eng. Florestal
>> Manaus/AM
>>
>>
>>
>> Forestry Engineer
>> Manaus/AM-Brazil
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
More information about the R-sig-ecology
mailing list