From ligges at statistik.uni-dortmund.de  Sat Nov  6 14:16:55 2004
From: ligges at statistik.uni-dortmund.de (Uwe Ligges)
Date: Sat Nov  6 14:16:35 2004
Subject: [Rd] wishlist: better error message in R CMD check
In-Reply-To: <3A822319EB35174CA3714066D590DCD50994E28E@usrymx25.merck.com>
References: <3A822319EB35174CA3714066D590DCD50994E28E@usrymx25.merck.com>
Message-ID: <418CCEC7.2090802@statistik.uni-dortmund.de>

Liaw, Andy wrote:

> Gabor,
> 
> I guess is that you did not try to run R CMD INSTALL before R CMD check.  R
> CMD check will try to install the package first (in pkg.Rcheck), and only if
> that's successful would checks be done.
> 
> The installation process will concatenate all R files in R/ to a single file
> and essentially source() that in upon package loading.  That's where you
> would see the syntax error.  I believe the recommended way is to install the
> package and play with that a bit first, before doing R CMD check.  You'd
> find some problems are much easier to find that way (e.g., errors in
> NAMESPACE).
> 
> Cheers,
> Andy
> 
> 
>>From: Gabor Grothendieck
>>
>>I was running R CMD check on Windows XP 2.0.1beta and 
>>got this:
>>
>>Error in parse(file, n, text, prompt) : syntax error on 602
>

I found that syntax errors quite frequently are caused by missing 
newlines at the end of files.
What about changing the build scipts so that a newline is inserted after 
each of those files?

Uwe Ligges


>>After a lot of aggravation I finally discovered that if I did
>>this:
>>
>>copy *.R allofthem.R
>>
>>and checked line 602 in allofthem.R that I could find the error.
>>I noticed that there are repeated references in the help archives
>>to this sort of error and how hard it is to locate it.  It 
>>certainly would be nice to tell the user which file the error
>>is in and to point to the original files, not some intermediate
>>file or if one must do it in terms of intermediate files to keep
>>the file around and tell the user which and where it is.
>>
>>______________________________________________
>>R-devel@stat.math.ethz.ch mailing list
>>https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
> 
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] wishlist: better error message in R CMD check
Uwe Ligges