[Rd] Error: unknown identifier {|} in tabular format {|l|c|c|c|}

Martin Maechler maechler at stat.math.ethz.ch
Tue Jan 20 10:31:36 MET 2004


>>>>> "Jeff" == Jeff D Hamann <jeff.hamann at 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 at 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			<><



More information about the R-devel mailing list