Re: TableHeadings for 1x1 tables
- To: mathgroup at smc.vnet.net
- Subject: [mg60187] Re: TableHeadings for 1x1 tables
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Tue, 6 Sep 2005 05:28:51 -0400 (EDT)
- Organization: The Open University, Milton Keynes, U.K.
- References: <dfiv6h$p8a$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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.