[R-sig-Geo] K-means clustering with landsat data

Vikram Ranga babuawara at gmail.com
Wed Jan 11 11:15:53 CET 2012


Hello Everyone,
I am trying to run k-means algorithm with R on Landsat images but it is 
giving error that the data type is not supported.
My syntax is
juneb1<-readGDAL("G:/landsat/New Landsat/June/2002-06-08/8juneb10.tif")
kmenjuneb<-kmeans(juneb1,10,iter.max = 6, nstart = 1,
        algorithm = c("Hartigan-Wong", "Lloyd", "Forgy",
                      "MacQueen"))
error message
Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1)

Is there anyother way to do cluster analysis to spatial data in R?
Any help would be greatly appreciated.


Vikram.



More information about the R-sig-Geo mailing list