Error in parse

Paul Gilbert pgilbert@bank-banque-canada.ca
Mon, 5 Jan 1998 17:23:01 -0500


I have narrowed my problem with parse to the example below. This is not a
working piece of code, but does cause the source problem. (This also occurs with
R 0.61.) The code will cut and paste into R ok, but if I cut and paste into a
file and source the file I get
Error in parse(file, n, text, prompt) : syntax error on line 23

Relatively minor things like changing
   }  }  }  }
to
   }  }  }
}
will make the problem go away. (So I guess I know a solution, but it seems like
there is a bug.)

Paul Gilbert
________

ARMA <- function(model)
{
if (0 !=m) if (p != dim(C)[2]) stop("dimension of model parameters do not
conform!")
if (fortran)  if (m==0) C <- array(0,c(1,p,1))
else
  {for (Time in 1:sampleT)
      {if (b >= 2) for (l in 2:b)
          if (l<=Time) vt <- vt - c(B[l,,] %*% prederror[Time+1-l,])
       if (m!=0) for (l in 1:dim(C)[1])
          if (l<=Time) vt <- vt - c(C[l,,] %*% u[Time+1-l,])
       prederror[Time,] <- vt
       if (any(0!=error.weights))
        {
         if (length(error.weights)>1)
           {for (h in 2:length(error.weights))
            if ( (Time+h-1) <= sampleT)
              {vt    <-  rep(0,p)
     }  }  }  }
  }
1
}

KF <- function(model)
{2}


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._