MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: TableHeadings for 1x1 tables


Jason Quinn wrote:
> The TableHeadings option seems not to work for 1x1 tables. Here's a
> simple example:
> 
> TableForm[Table[{0.473}, {i, 1}], TableHeadings -> {None, {"Value"}}]
> 
> Is this a bug or am I mis-understanding something?
> 
> Jason Quinn
> 
Hi Jason,

Although a 1x1 table is not, arguably, a table (in this case not 
returning any table header is fine), a deeper inspection of the 
instruction returned by Mathematica shows that *TableForm* has some 
trouble in managing correctly what are and where are located the raw 
headers and data. Compare

In[1]:=
TableForm[{{0.473}}, TableHeadings -> {None, {"Value"}}]
TableForm[{{0.473}}, TableHeadings -> {{"Raw 1", "Raw 2"}, {"Value 1", 
"Value 2"}}]
TableForm[{{0.473}}, TableHeadings -> {{"Raw 1"}, {"Value 1", "Value 2"}}]
TableForm[{{0.473}}, TableHeadings -> {{"Raw 1"}, {"Value 1"}}]
TableForm[{{0.473}}, TableHeadings -> {{}, {"Value 1"}}]
TableForm[{{0.473}, {}}, TableHeadings -> {None, {"Value"}}]

Note that the last line displays the header and the values correctly 
line but at the cost of an additional empty raw.

Best regards,
/J.M.


  • Prev by Date: Re: coding problem
  • Next by Date: Re: Latex & Mathematica
  • Previous by thread: TableHeadings for 1x1 tables
  • Next by thread: Re: TableHeadings for 1x1 tables