<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Dear Gianni,<br>
      <br>
      Also possible is a Method that also works for very large rasters
      (calculation done in chunks)<br>
      <br>
      C<-overlay(A, B, fun=function(a,b) return(a==b))<br>
      <br>
      Best<br>
      Julian<br>
      <br>
      <br>
      Am 06.02.2013 13:55, schrieb Wilfried Thuiller:<br>
    </div>
    <blockquote
      cite="mid:B23A3B07-BAAA-4B90-8D65-927D92703DC4@ujf-grenoble.fr"
      type="cite">
      <pre wrap="">Dear Gianni,

Something along these lines should directly return what you look for:

C <- A == B

Best
Wilfried




Le 6 févr. 2013 à 13:41, gianni lavaredo a écrit :

</pre>
      <blockquote type="cite">
        <pre wrap="">Dear Members list,

I have two raster (A and B) with the same extent, number of rows and
columns, projection, resolution, and origin. Some pixels of A have the same
values of B.

I wish in a code saving style compare A with B and create a new raster
where the pixel value is 1  (when the statement is true: the pixel value of
A and B are equal) otherwise 0 (false)

Do you know some specific function in raster
Thanks in advance
Gianni

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-sig-Geo@r-project.org">R-sig-Geo@r-project.org</a>
<a class="moz-txt-link-freetext" href="https://stat.ethz.ch/mailman/listinfo/r-sig-geo">https://stat.ethz.ch/mailman/listinfo/r-sig-geo</a>
</pre>
      </blockquote>
      <pre wrap="">


        [[alternative HTML version deleted]]

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
R-sig-Geo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-sig-Geo@r-project.org">R-sig-Geo@r-project.org</a>
<a class="moz-txt-link-freetext" href="https://stat.ethz.ch/mailman/listinfo/r-sig-geo">https://stat.ethz.ch/mailman/listinfo/r-sig-geo</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>