Skip to content

Syntax Error in Rcmd check on Windows

5 messages · Michael Hoehle, Duncan Murdoch, Peter Dalgaard

#
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

--

---
* checking for working latex ... OK
* using log directory 'z:/Transmission/RLadyBug/..Rcheck'
* using R version 2.4.0 (2006-10-03)
* checking for file './DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'RLadyBug' version '0.4-1'
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking whether package 'RLadyBug' can be installed ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for syntax errors ... OK
* checking R files for non-ASCII characters ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the name space can be loaded with stated dependencies ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* creating RLadyBug-Ex.R ... OK
* checking examples ... ERROR
Running examples in 'RLadyBug-Ex.R' failed.
The error most likely occurred in:
+                   E0=matrix( c(  1, rep(  0, 7 ) ), ncol=4 ) )
+                             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
#
On 10/31/2006 8:38 AM, Michael Hoehle wrote:
No. Could you send me the RLadyBug-Ex.R file?  I'd like to get an exact 
copy of what you have, so please put it in a .zip or other archive.  If 
you use .zip, you'll need to rename it when mailing (or just put it on a 
web page somewhere), because our mail server doesn't accept emailed .zip 
files.

Duncan Murdoch
Is there a closing parenthesis not shown?  Because they don't balance in 
that expression.
#
"Michael Hoehle" <michael.hoehle at gmail.com> writes:
....
....

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?)
#
Hello again,

Thank you for the feedback. I put the source File on the net as

http://www.statistik.lmu.de/~hoehle/software/RLadyBug/RLadyBug-Ex.zip

In case you need the entire "..Rcheck" directory I put this as

http://www.statistik.lmu.de/~hoehle/software/RLadyBug/Rcheck.zip

The "("  ")" should balance as it runs through source without
problems. I tried to use "hexl-mode" in Emacs to look for funny
characters, but didn't find any. If I delete the "initDia" line I just
get an syntax error a few lines later...

Probably its something very stupid thats wrong, but atm I fail to see it.

Best regards,

Michael H?hle
#
On 10/31/2006 8:38 AM, Michael Hoehle wrote:
Thanks for pointing me to the source.  I can reproduce the problem, and 
I'm fairly sure it's an R bug, not a problem in your source.  I need to 
trace through at a low level to confirm this and to work out the fix.

Duncan Murdoch