[R] code/documentation mismatches

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Sep 6 09:53:39 CEST 2001


Christian Hoffmann <christian.hoffmann at wsl.ch> writes:

> Hi,
> 
> I would like to get a hint on how to debug in the case of 
> 
> #> R CMD check pllib
> 
> signalling
> 
> * checking for code/documentation mismatches ... WARNING
> Error in parse(file, n, text, prompt) : syntax error on line 22
> 
> I am able to sort out which of the files is the culprit is by swapping
> files in and out of the /R and /man directories. But I cannot find the
> syntax error, the .Rd file seems to be correct.
> 
> It would be helpful to have an indication of the file which contains the
> error. The corresponding line in 
> 
> \pllib.Rcheck\pllib-Ex.R
> 
> is even a blank line.

That's not the file with the problem. As I read the code, it is a
dynamically constructed file containing the usage sections of your .Rd
files. 

Hmm. Longer term, I think we might want a small change to "R CMD
check" to be optionally more verbose.

Your problem would seem to happen during this section:

        open Rcmd, "> $Rcmd" || die "Cannot write to \`$Rcmd'\n";
        print Rcmd "codoc(dir = \"${pkgdir}\")\n";
        close Rcmd;
        system("${R_exe} ${R_opts} --quiet < ${Rcmd} > ${Rout}");

so the thing you could do to decipher the problem would be to fire up
R yourself and run

codoc(dir="/path/to/pllib", verbose=T)

you might want to precede that with debug(codoc) so that you can catch
the actual file before it is deleted.
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list