Addition and subtraction of rasterbrick objects in RHow to convert 'RasterBrick' object to 'im' object in...

Why did Luke use his left hand to shoot?

Solving the linear first order differential equation?

Where does documentation like business and software requirement spec docs fit in an agile project?

Was Claire Dearing blamed for any of Jurassic World's failings?

The relationship between entanglement of vector states to matrix operations

Insecure private-key encryption

How can I automatically launch GPSD on startup?

Was there a pre-determined arrangement for the division of Germany in case it surrendered before any Soviet forces entered its territory?

Other than edits for international editions, did Harry Potter and the Philosopher's Stone receive errata?

Word for something that's always reliable, but never the best?

Is .NET Framework 3.5 still needed with a SQL Server 2017 installation to utilize Database Mail?

Why is Shelob considered evil?

What is a good way to explain how a character can produce flames from their body?

Feature to polygon in multiple folders

How do I avoid the "chosen hero" feeling?

Writing dialogues for characters whose first language is not English

Democratic Socialism vs Social Democracy

How can find the 2D Voronoi cell area distribution?

Is the fingering of thirds flexible or do I have to follow the rules?

How does a Warlock with Pact of the Blade visually appear to fight?

How can I handle players killing my NPC outside of combat?

Growth of Mordell-Weil Rank of Elliptic Curves over Field Extensions

Isn't a semicolon (';') needed after a function declaration in C++?

Why do objects rebound after hitting the ground?



Addition and subtraction of rasterbrick objects in R


How to convert 'RasterBrick' object to 'im' object in R?Intersection of two Raster objectsClipping raster objects in PostGISDifficulties applying zyp.sen() to a RasterBrick object in RHow to check whether two raster (RasterBrick) objects show the same trend in R (how to apply spatial testing)?jpg addition to qgisApply SPEI::hargreaves function to time series from each pixel rasterbrick RR: Efficient addition of random noise to a raster datasetWrite each layer of a RasterBrick as a kml fileRaster Subtraction with QgsRasterCalculator in PyQGIS













0















I have two rasterbrick objects showing precipitation. Both have longitude and latitude dimensions of 144 x 72. The first (brick1) has 478 monthly time layers (39 years, 10 months) running from Jan 1979 to Oct 2018. The second (brick2) has 12 monthly time layers (Jan through Dec) representing the monthly mean values for 1981-2010. I want to calculate an anomaly by subtracting the geographically appropriate monthly mean from each data point. I did this:



anom <- brick1-brick2



R did not complain - but I am not sure if I got what I wanted.



My hope is that R will subtract the January through December means first against 1979, then it will recycle those means identically through each year until 2018, and in 2018 it will apply only the first 10 means (Jan through October). I have not been able to find any documentation that indicates whether this is the way it is actually done. I have seen some statements to the effect that some operations recycle smaller objects against the larger ones, but nothing specifically about rasterbricks. Does anybody know?









share







New contributor




jbtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I have two rasterbrick objects showing precipitation. Both have longitude and latitude dimensions of 144 x 72. The first (brick1) has 478 monthly time layers (39 years, 10 months) running from Jan 1979 to Oct 2018. The second (brick2) has 12 monthly time layers (Jan through Dec) representing the monthly mean values for 1981-2010. I want to calculate an anomaly by subtracting the geographically appropriate monthly mean from each data point. I did this:



    anom <- brick1-brick2



    R did not complain - but I am not sure if I got what I wanted.



    My hope is that R will subtract the January through December means first against 1979, then it will recycle those means identically through each year until 2018, and in 2018 it will apply only the first 10 means (Jan through October). I have not been able to find any documentation that indicates whether this is the way it is actually done. I have seen some statements to the effect that some operations recycle smaller objects against the larger ones, but nothing specifically about rasterbricks. Does anybody know?









    share







    New contributor




    jbtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I have two rasterbrick objects showing precipitation. Both have longitude and latitude dimensions of 144 x 72. The first (brick1) has 478 monthly time layers (39 years, 10 months) running from Jan 1979 to Oct 2018. The second (brick2) has 12 monthly time layers (Jan through Dec) representing the monthly mean values for 1981-2010. I want to calculate an anomaly by subtracting the geographically appropriate monthly mean from each data point. I did this:



      anom <- brick1-brick2



      R did not complain - but I am not sure if I got what I wanted.



      My hope is that R will subtract the January through December means first against 1979, then it will recycle those means identically through each year until 2018, and in 2018 it will apply only the first 10 means (Jan through October). I have not been able to find any documentation that indicates whether this is the way it is actually done. I have seen some statements to the effect that some operations recycle smaller objects against the larger ones, but nothing specifically about rasterbricks. Does anybody know?









      share







      New contributor




      jbtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I have two rasterbrick objects showing precipitation. Both have longitude and latitude dimensions of 144 x 72. The first (brick1) has 478 monthly time layers (39 years, 10 months) running from Jan 1979 to Oct 2018. The second (brick2) has 12 monthly time layers (Jan through Dec) representing the monthly mean values for 1981-2010. I want to calculate an anomaly by subtracting the geographically appropriate monthly mean from each data point. I did this:



      anom <- brick1-brick2



      R did not complain - but I am not sure if I got what I wanted.



      My hope is that R will subtract the January through December means first against 1979, then it will recycle those means identically through each year until 2018, and in 2018 it will apply only the first 10 means (Jan through October). I have not been able to find any documentation that indicates whether this is the way it is actually done. I have seen some statements to the effect that some operations recycle smaller objects against the larger ones, but nothing specifically about rasterbricks. Does anybody know?







      raster r





      share







      New contributor




      jbtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      jbtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      jbtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 min ago









      jbtgjbtg

      1




      1




      New contributor




      jbtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      jbtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      jbtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          jbtg is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313414%2faddition-and-subtraction-of-rasterbrick-objects-in-r%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          jbtg is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          jbtg is a new contributor. Be nice, and check out our Code of Conduct.













          jbtg is a new contributor. Be nice, and check out our Code of Conduct.












          jbtg is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313414%2faddition-and-subtraction-of-rasterbrick-objects-in-r%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

          Meter-Bus Содержание Параметры шины | Стандартизация |...