<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">Hello,<br>
      <br>
      <span id="result_box" class="" lang="en"><span class="">I believe
          you are applying the calc function to an object that is not a
          raster</span></span>stack.<br>
      For calc, you must specify a raster object like your MODIS ( or
      other sensor) raster stack time series.<br>
      <br>
      Regards,<br>
      <pre class="moz-signature" cols="72">François Messner
Technicien en géomatique
Université du Maine - GREGUM UMR ESO
Tel: 02 43 83 31 80</pre>
      Le 06/03/2017 18:28, Natalia Quinteros a écrit :<br>
    </div>
    <blockquote
cite="mid:CAOZBhq3edXuDmTUonFWpaBD_PxjKB2cKry23=VdqmO0y1t+whw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi List, 
        <div><br>
        </div>
        <div>I was doing the time series excersise of the book and I run
          into a problem: </div>
        <div><br>
        </div>
        <div>So this is my script: </div>
        <div><br>
        </div>
        <div>
          <div>f_bfm <- function(x) {x <- ts(evi, start= c(2003,
            1),frequency =46)</div>
          <div>  bfm <- bfastmonitor(data = x, start = c(2010, 1))</div>
          <div>  return(cbind(bfm$breakpoint, bfm$magnitude))</div>
          <div>}  </div>
          <div><br>
          </div>
          <div>rbfm <- calc(evi, fun = function(x){</div>
          <div>  t(apply(x,1,f_bfm))</div>
          <div>})</div>
        </div>
        <div><br>
        </div>
        <div>When I run rbfm I receive this error: </div>
        <div><br>
        </div>
        <div>
          <div>Error in (function (classes, fdef, mtable)  : </div>
          <div>  unable to find an inherited method for function ‘calc’
            for signature ‘"ts", "function"’</div>
        </div>
        <div>
          <div>
            <div class="gmail_signature">
              <div dir="ltr">
                <div dir="ltr"><br>
                </div>
                <div>So, where is calc coming from? Is it coming from
                  the package raster? Or what is the problem here? </div>
                <div><br>
                </div>
                <div>Thanks.</div>
                <div dir="ltr"><br>
                </div>
                <div dir="ltr"><br>
                </div>
                <div dir="ltr">Natalia L Quinteros Casaverde<br>
                </div>
                <div dir="ltr">
                  <div>Ph.D Student </div>
                  <div>Remote Sensing and Ecosystems Lab</div>
                  <div>EEB - Biology</div>
                  <div>City University of New York & </div>
                  <div><span style="font-size:12.8px">Graduate Center</span><br>
                  </div>
                  <div>CUNY</div>
                  <div><br>
                  </div>
                  <div><br>
                    <br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
RS-ecology mailing list
<a class="moz-txt-link-abbreviated" href="mailto:RS-ecology@lists.uni-wuerzburg.de">RS-ecology@lists.uni-wuerzburg.de</a>
<a class="moz-txt-link-freetext" href="https://lists.uni-wuerzburg.de/mailman/listinfo/rs-ecology">https://lists.uni-wuerzburg.de/mailman/listinfo/rs-ecology</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>