[Rd] Syntax Error in Rcmd check on Windows

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Oct 31 15:05:51 CET 2006


"Michael Hoehle" <michael.hoehle at gmail.com> writes:

> Dear R-developers,
> 
> I am currently developing an R package called RLadyBug. When
> developing under Linux "R CMD check ." works fine without a warning.
> However, when I do "Rcmd check ." under Windows (version 2.4.0 and
> earlier)  I get a „syntax error" when checking the examples.
> 
> This puzzles me somewhat, because a manual source("RLadyBug-Ex.R") on
> Windows works fine. On the other hand, a "Rterm.exe --no-save <
> RLadyBug-Ex.R" in a command shell under Windows reproduces the error.
> My first guess was that the very long line was causing the problem,
> but when I open RLadyBug-Ex.R in Emacs, change the coding system from
> "undecided-dos" to "undecided-unix" and save the file "Rterm.exe
> --no-save < RLadyBug-Ex.R" works fine....
> 
> Does anybody has an idea what is causing the error and how to fix this?
> 
> Best regards,
> 
> Michael Höhle

....
> > sim.opts <- new( "LBOptions", seed=2006,
> +                             LBmodel=c( "gamma", "gamma", "gamma", FALSE ),
> +                             ignoreData=c( FALSE, FALSE, FALSE ),
> +                             initBeta =list( init=0.125,
> +                                         gamma=0.001, delta=0.001 ),
> +                             initBetaN=list( init=0.018,
> +                                         gamma=0.001, delta=0.001 ),
> +                             initIncu=list( asis=FALSE, const=FALSE,
> +                                     g=6.697, g.gamma=0.001, g.delta=0.001,
> +                                     d=0.84, d.gamma=0.001,d.delta=0.001 ),
> +                             initInf=list( 1.772, 0.001, 0.001,
> 0.123, 0.001, 0.001 ),
> +                             initDia=list( 149.126, 0.001, 0.001,
> +                                     8.737, 0.001, 0.001 ) )
> Error: syntax error in:
> "a=list( 149.126, 0.001, 0.001,
> "                                   8.737, 0.001, 0.001 ) )
> Execution halted
....

It's a longshot, but could some funny characters have crept in around
"initDia"?? (There's a way to open it in Hex from inside Emacs, isn't
there?)

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-devel mailing list