<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;"
text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 19/11/2018 12:41, Markus Neteler
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALFmHhsKV2YKdEzh8efsRfDvhOHoWMFtFFou3WczEs5D93gEVg@mail.gmail.com">
<pre wrap="">On Sun, Nov 18, 2018 at 10:32 PM Micha Silver <a class="moz-txt-link-rfc2396E" href="mailto:tsvibar@gmail.com"><tsvibar@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
I am preparing a correlation matrix for 7 raster layers. The results using the r.covar module are different from the R layerStats function. I suspect this is due to handling of null cells. The R function has a parameter to remove NA cells, but the GRASS module, I think, just loops over all cells, including no value.
Can anyone confirm that GRASS does not deal with null cells, and that this would cause the difference in correlation results?
</pre>
</blockquote>
<pre wrap="">
Here how r.covar treats NULL cells:
<a class="moz-txt-link-freetext" href="https://trac.osgeo.org/grass/browser/grass/trunk/raster/r.covar/main.c#L93">https://trac.osgeo.org/grass/browser/grass/trunk/raster/r.covar/main.c#L93</a></pre>
</blockquote>
Hi Markus<br>
Thanks, I missed those lines when I glanced over the source (not a C
programmer).<br>
I'll do some more testing to try to understand why I'm getting
different results from R compared to GRASS. <br>
<br>
<blockquote type="cite"
cite="mid:CALFmHhsKV2YKdEzh8efsRfDvhOHoWMFtFFou3WczEs5D93gEVg@mail.gmail.com">
<pre wrap="">
Markus
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
+972-523-665918</pre>
</body>
</html>