<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>thanks a lot. Now the process started, but the operation&nbsp;DTM_class &lt;- classIntervals(DTM.df$varOfInterest, n=5, style="fisher"&nbsp;takes too long; <span class="Apple-style-span" style="background-color: transparent;">it&nbsp;</span><span class="Apple-style-span" style="background-color: transparent;"><span class="hps">was</span>&nbsp;<span class="hps">started by</span>&nbsp;<span class="hps">hours but</span>&nbsp;<span class="hps">does not end</span><span class="Apple-style-span">. Is it normal?</span></span></div><div><span class="Apple-style-span" style="background-color: transparent;"><br></span></div><div><span class="Apple-style-span" style="background-color: transparent;">Salvatore</span></div><div><br></div><div><br><div><div><div>Il giorno 16/mag/2012, alle ore 22:04, Luigi Ponti ha scritto:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">On 16/05/2012 21:10, Luigi Ponti wrote:<br><blockquote type="cite">On 16/05/2012 20:55, Salvatore Mellino wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">I'm trying but I receive an error.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">1. In R I started the libraries spgarass6 and classInt<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">2. I imported the DTM in R using &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DTM&lt;- readRAST6("DTM@mapset", ignore.stderr=TRUE)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">3. I used the command &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DTM_class&lt;- classIntervals(DTM, n=5, style="fisher") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and I received the error<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Error in classIntervals(DTM, n = 5, style = "fisher") :<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">&nbsp;&nbsp;var is not numeric<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">DTM.df &lt;- as.data.frame(DTM)<br></blockquote><blockquote type="cite">DTM_class &lt;- classIntervals(DTM.df, n=5, style="fisher")<br></blockquote><blockquote type="cite"><br></blockquote><br>I am replying to myself as I may have omitted part of the answer -- my apologies. Start the same way:<br><br>&nbsp;&nbsp;&nbsp;DTM.df &lt;- as.data.frame(DTM)<br><br>then get variable names:<br><br>&nbsp;&nbsp;&nbsp;names(deltaYieldVector.df)<br><br>then use the variable of interest (altitude, I guess):<br><br>&nbsp;&nbsp;&nbsp;DTM_class &lt;- classIntervals(DTM.df$varOfInterest, n=5, style="fisher")<br><br>This should work; we were feeding a data.frame as input to classIntervals, whereas a variable is needed (e.g. one of the variables in the data.frame).<br><br>Let me know how it goes.<br><br>Kind regards,<br><br>Luigi</span></blockquote></div><br></div></div></body></html>