[GRASS-user] Natural breaks classification
Luigi Ponti
lponti at inbox.com
Wed May 16 15:10:26 EDT 2012
On 16/05/2012 20:55, Salvatore Mellino wrote:
> I'm trying but I receive an error.
>
> 1. In R I started the libraries spgarass6 and classInt
> 2. I imported the DTM in R using DTM<- readRAST6("DTM at mapset", ignore.stderr=TRUE)
> 3. I used the command DTM_class<- classIntervals(DTM, n=5, style="fisher") and I received the error
>
> Error in classIntervals(DTM, n = 5, style = "fisher") :
> var is not numeric
I do not recall exactly, but it may be that classIntervals does not have
a method for spatial data frames (i.e. the output of readRAST6). One
thing I would try to get the breaks anyway, is a regular R data.frame,
for example:
DTM.df <- as.data.frame(DTM)
DTM_class <- classIntervals(DTM.df, n=5, style="fisher")
Hope this helps,
Luigi
More information about the grass-user
mailing list