[R-sig-Geo] Spatial cluster analysis

marcelino.delacruz at upm.es marcelino.delacruz at upm.es
Fri Jan 6 21:35:38 CET 2012


I think that the correct answer to this question is "use the raster and
the dismo package". In fact, dismo has the possibility of "fitting"
Maxent models directly from R.

In any case, with raster package you can easily import ASC files (I
suppose one file for each species), join them in an stack object and
depending on the size of your maps (i.e. number of pixels) and your
favourite classification approach (e.g. hierarchical vs. non
hierarchical) select the appropriate functions/packages. For example,
package vegan has function vegedist that is very appropriate for
community data. You can use it to compute a distance matrix (based on
the species data) between the pixels of your map an then submit this
matrix to hclust to compute a classificatory tree. You can cut this tree
(with cutree) at the desired number of communities or dissimilarity and
create a new layer in your raster stack with the "number" of cluster
to which each pixel has been assigned that can eassily ploted as a
"community map"
If the number of pixels is large you can consider using function clara in
package cluster or a combination of clara for a subsample (i.e. training
data set) plus a nearest neughbour classifier (e.g. function knn1)

HTH,

Marcelino

Con fecha 5/1/2012, "José Miguel Barrios" <jmbarriosg at gmail.com>
escribió:

>Hello,
>
>Take a look at the DCluster package;  it contains several options for
>spatial clusters of diseases.  You are not dealing with disease mapping but
>it may be a good idea to take a look at these methods anyway.
>
>Success,
>
>Miguel
>
>
>
>2012/1/5 Mathieu Rajerison <mathieu.rajerison at gmail.com>
>
>> I don't think I'm a specialist for that question. Other people will
>> complete what I'll say, if necessary
>>
>> For the moment, what you should try is to get points representing presence
>> from your image (I think of it as being a regular grid image).
>>
>> Then, to visually seggregate clusters of presence, you could use
>> spatstat::density function
>>
>> 2012/1/5 ah3881 <ah3881 at bristol.ac.uk>
>>
>> > Thanks for that, it looks great for the raw spatial data!
>> > The thing is I have used the raw spatial data to produce a species
>> > distribution projection for each species (using Maxent), then
>> reclassified
>> > each to give a binary presence absence map (which is currently a PNG, but
>> > could be redone as an ASCII file), so I am mainly working with binary
>> maps
>> > rather than the points-and it is these distributions I want to run
>> cluster
>> > analysis on-so I can see the segregation of different community
>> assemblies
>> > in space.
>> >
>> > --
>> > View this message in context:
>> >
>> http://r-sig-geo.2731867.n2.nabble.com/Spatial-cluster-analysis-tp7149074p7153834.html
>> > Sent from the R-sig-geo mailing list archive at Nabble.com.
>> >
>> > _______________________________________________
>> > R-sig-Geo mailing list
>> > R-sig-Geo at r-project.org
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>> >
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>	[[alternative HTML version deleted]]
>
>_______________________________________________
>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