title: __result not declared in this scope
body: <p>Hi I am getting an error "__result was not declared in this scope". There is no variable "result" any more. "outResult" was named "result" before. But renamed.</p>
  
  <p>I did cut down the code. It makes no sense but is simple now and I get the error.</p>
  
  <p>Are there any temporary files which I could delete?</p>
  
  <p>Thanks in advance</p>
  
  <pre><code>#include &lt;Rcpp.h&gt;
  using namespace Rcpp;
  
  // Rf_warning
  // [[Rcpp::export]]
  
  // Function findPIPs_cpp
  NumericVector findPIPs_cpp(NumericVector x, NumericVector y) {
  
    IntegerVector PIPs(x.size());
    IntegerVector outResult(x.size());  
    NumericVector PIPLine(x.size()); // Interpolated Values
  
  
    outResult[0] = 0;
    outResult[1] = y.size()-1;
  
       int i = 0;
       int n = 1;
  
      // sort the existing PIPs
      PIPs = outResult[outResult &gt; 0];
      std::sort(PIPs.begin(), PIPs.end());
  
      // first point of the interpolated line
      PIPLine[0] = y[PIPs[0]];
  
  
      PIPLine[n] = margin *  (x[PIPs[i]]-x[PIPs[i+1]]) + y[PIPs[i]];
  
  
  
    return PIPLine;
  
  
  }
  </code></pre>