From pgilbert@bank-banque-canada.ca  Mon Jan  5 22:23:01 1998
From: pgilbert@bank-banque-canada.ca (Paul Gilbert)
Date: Mon, 5 Jan 1998 17:23:01 -0500
Subject: Error in parse
Message-ID: <98Jan5.172327est.13453@mailgate.bank-banque-canada.ca>

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Error in parse
Paul Gilbert