Hello all I am fairly new to the world of R and am working somewhere where no one uses it much yet... I want to run a spatial cluster analysis on a load of species distributions (binary ASCII or PNG maps) to look for possible "biotic" zones, i.e. regional species assemblies. I have tried downloading some of the "cluster" type packages but have as yet have not managed to get anything to run. If I upload the file of folders into R, could anyone advise me on the best package, and a possible script that I can use to run the spatial cluster? Thanks so much! Alice -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Spatial-cluster-analysis-tp7149074p7149074.html Sent from the R-sig-geo mailing list archive at Nabble.com.
Spatial cluster analysis
6 messages · ah3881, Mathieu Rajerison, José Miguel Barrios +1 more
1 day later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120105/36847a32/attachment.pl>
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.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120105/77827503/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120105/6b72f77c/attachment.pl>
1 day later
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:
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