Jeff D. Hamann
2004-Jan-20 09:24 UTC
[Rd] Error: unknown identifier {|} in tabular format {|l|c|c|c|}
I've got a package I would like to send out for testing and have noticed a "problem" with the \tabular portion of the help "compiler" the code for inserting vertical lines, in the tabular environment, causes the build to choke, but not the check command. C:\>rcmd build --binary -docs=all nlsystemfit \tabular{|l|c|c|c|}{ \hline Method \tab Instruments \tab Objective Function \tab Covariance of \eqn{\theta}\cr\hline ...blah, blah,blah... 3SLS \tab yes \tab \eqn{r'(S_{2SLS}^{-1} \bigotimes W)r} \tab \eqn{(X(diag(S)^{-1}\bigotimes W)X)^{-1}}\hline } ...yields... not zipping data installing help >>> Building/Updating help pages for package 'nlsystemfit' Formats: text html latex example Error: unknown identifier {|} in tabular format {|l|c|c|c|} make[1]: *** [help-nlsystemfit] Error 2 make: *** [pkg-nlsystemfit] Error 2 *** Installation of nlsystemfit failed *** but C:\>rcmd build --binary nlsystemfit doesn't choke, but doesn't produce all the documents either. When I run rcmd rd2dvi.sh <package> I get the results I expect. Does this have something to do with the html (since those docs don't get created without the --docs=all argument) or the chm generation process? I'll remove the | from the formatting for now... Thanks, Jeff. --- Jeff D. Hamann Forest Informatics, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 (office) 541-754-1428 (cell) 541-740-5988 jeff.hamann@forestinformatics.com www.forestinformatics.com
Prof Brian Ripley
2004-Jan-20 10:19 UTC
[Rd] Error: unknown identifier {|} in tabular format {|l|c|c|c|}
You appear to be writing latex, but I guess this is part of an Rd file. Do read `Writing R Extensions' for the description of the actual Rd language (which does not have that format specifier}. \hline is not part of the Rd language either, and you will need the two-argument form of \eqn{} for expressions like those. Finally, it is not `build' that chokes, but `INSTALL' called by `build --binary'. It is often much easier to see what is going on by calling INSTALL directly. On Tue, 20 Jan 2004, Jeff D. Hamann wrote:> I've got a package I would like to send out for testing and have noticed a > "problem" with the \tabular portion of the help "compiler" > > the code for inserting vertical lines, in the tabular environment, causes > the build to choke, but not the check command. > > > C:\>rcmd build --binary -docs=all nlsystemfit > > \tabular{|l|c|c|c|}{ > \hline > Method \tab Instruments \tab Objective Function \tab Covariance of > \eqn{\theta}\cr\hline > ...blah, blah,blah... > 3SLS \tab yes \tab \eqn{r'(S_{2SLS}^{-1} \bigotimes W)r} \tab > \eqn{(X(diag(S)^{-1}\bigotimes W)X)^{-1}}\hline > } > > ...yields... > > not zipping data > installing help > >>> Building/Updating help pages for package 'nlsystemfit' > Formats: text html latex example > Error: unknown identifier {|} in tabular format {|l|c|c|c|} > make[1]: *** [help-nlsystemfit] Error 2 > make: *** [pkg-nlsystemfit] Error 2 > *** Installation of nlsystemfit failed *** > > but C:\>rcmd build --binary nlsystemfit doesn't choke, but doesn't produce > all the documents either. When I run rcmd rd2dvi.sh <package> I get the > results I expect. Does this have something to do with the html (since those > docs don't get created without the --docs=all argument) or the chm > generation process? > > I'll remove the | from the formatting for now... > > Thanks, > Jeff. > > --- > Jeff D. Hamann > Forest Informatics, Inc. > PO Box 1421 > Corvallis, Oregon USA 97339-1421 > (office) 541-754-1428 > (cell) 541-740-5988 > jeff.hamann@forestinformatics.com > www.forestinformatics.com > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel > >-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Martin Maechler
2004-Jan-20 10:29 UTC
[Rd] Error: unknown identifier {|} in tabular format {|l|c|c|c|}
>>>>> "Jeff" == Jeff D Hamann <jeff.hamann@forestinformatics.com> >>>>> on Tue, 20 Jan 2004 00:25:39 -0800 writes:Jeff> I've got a package I would like to send out for Jeff> testing and have noticed a "problem" with the \tabular Jeff> portion of the help "compiler" Jeff> the code for inserting vertical lines, in the tabular Jeff> environment, causes the build to choke, but not the Jeff> check command. Remember, that Rd is not LaTeX __at all_ It is format translated to text/html/latex (and "R" for the examples). We know that the format is severely limited and had expected to replace it by a much more versatile XML based format but then realized that people would have to *write* in such a format, most probably needing a smart editor-interface .... a whole can of worms we didn't dare to open really. The "Writing R Extensions" clearly says>> The `\tabular' command takes two arguments. The first gives for >> each of the columns the required alignment (`l' for left-justification, >> `r' for right-justification or `c' for centering.) The second argument >> consists of an arbitrary number of lines separated by `\cr', and with >> fields separated by `\tab'. For example: >> >> \tabular{rlll}{ >> [,1] \tab Ozone \tab numeric \tab Ozone (ppb)\cr >> [,2] \tab Solar.R \tab numeric \tab Solar R (lang)\cr >> [,3] \tab Wind \tab numeric \tab Wind (mph)\cr >> [,4] \tab Temp \tab numeric \tab Temperature (degrees F)\cr >> [,5] \tab Month \tab numeric \tab Month (1--12)\cr >> [,6] \tab Day \tab numeric \tab Day of month (1--31) >> } >> >> There must be the same number of fields on each line as there are >> alignments in the first argument, and they must be non-empty (but can >> contain only spaces).If it's true that R CMD check does not give any warnings on your \tabular{|l|c|c|c|}{ \hline .... then, that's a bug(let) in R CMD check (patches welcome :-) Note that \hline is not valid as well. Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <><