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. Thanks for help --christian Dr.sc.math.Christian W. Hoffmann Mathematics and Statistical Computing Landscape Modeling and Web Applications Swiss Federal Research Institute WSL Zuercherstrasse 111 CH-8903 Birmensdorf, Switzerland phone: ++41-1-739 22 77 fax: ++41-1-739 22 15 e-mail: christian.hoffmann_at_wsl.ch__prevent_spamming www: http://www.wsl.ch/staff/christian.hoffmann/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> Christian Hoffmann 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.If you have access to the current r-devel snapshot, use R CMD check from there (in fact, I think you could simply use codoc() from there). The newer versions report which file caused the problem, etc. If you do not have such access, use codoc() from the R prompt with `keep = TRUE', and inspect the tempfiles. Typically, the problems come from statements in \usage which are not valid R code. -k -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 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.This is done in ./src/scripts/check $log->checking("for code/documentation mismatches"); my $Rcmd = "$TMPDIR/Rcmd.$$"; my $Rout = "$TMPDIR/Rout.$$"; 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}"); my @out; open Rout, "< $Rout"; while(<Rout>) {chomp; push(@out, $_);} close Rout; unlink($Rcmd); unlink($Rout); we can see that the code checked is generated by "codoc", therefore: R> codoc(dir="path_to_mypackage") returns the code to be checked. Often the error above is caused by a newline in the parameter-list in the Rd-file. Torsten> > 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. > > Thanks for help > --christian > Dr.sc.math.Christian W. Hoffmann > Mathematics and Statistical Computing > Landscape Modeling and Web Applications > Swiss Federal Research Institute WSL > Zuercherstrasse 111 > CH-8903 Birmensdorf, Switzerland > phone: ++41-1-739 22 77 fax: ++41-1-739 22 15 > e-mail: christian.hoffmann_at_wsl.ch__prevent_spamming > www: http://www.wsl.ch/staff/christian.hoffmann/ > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> * 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.Christian, I've just been updating the code for a couple of packages and I got the same "* checking for code/documentation mismatches ... WARNING" - although I didn't get the syntax error bit. What I found it to be was that R CMD goes through the R code files and picks out all the parameters to pass to a function, then if it sees that there is an undocumented parameter flags a warning. I certainly had a couple of undocumented parameters I hadn't noticed. Yours may be the same sort of thing. Regards, David. ********************************************************************** ** Dr. David Lucy ** ** Joseph Bell Centre for Forensic Statistics and Legal Reasoning ** ** Department of Mathematics and Statistics ** ** The University of Edinburgh ** ** James Clerk Maxwell Building ** ** King's Buildings ** ** Mayfield Road ** ** Edinburgh ** ** EH9 3JZ ** ** ** ** tel: 0131 650 5057 ** ** extension: 505057 ** ** e-mail: dlucy at maths.ed.ac.uk ** ** ** ** Truncated address: ** ** ** ** Dr. David Lucy ** ** Department of Mathematics ** ** JCMB ** ** King's Buildings ** ** Edinburgh University ** ** Edinburgh ** ** EH9 3JZ ** ********************************************************************** -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._