Are table headings for aesthetics only?
For example, if I have:
table1 = TableForm[{{1, 1, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0},
{0, 0, 1, 1, 1}, {0, 0, 1, 0, 1}, {1, 1, 0, 0, 0},
{0, 1, 1, 0, 0}},
TableHeadings -> {{"1", "2", "3", "4", "5", "6", "7"},
{"a", "b", "c", "d", "e"}}]
is there any way to refer to a part of the table by the heading names?
For example, if I want the position of all 1's in the table,
Position[table1, 1]
I would like this to return both numbers and letters. Is this possible?
TableForm
is displaying tables in a pretty way. Don't useTableForm
as a data structure (unless you know for certain that this is an advantage for you...). Just use it to display a table stored as aList
in two-dimensional (readable) form. $\endgroup$ – Szabolcs Nov 26 '12 at 20:33