I wonder if there is an easy way to convert from TableForm to Grid. I have an existing data format that uses the Table function that I’d like to prettify….
Let’s setup a nested table as follows:
params = {"A", "B", "C", "D"}; (*example, can be more *);
axes = {"x", "y", "z”}; (*fixed number*) ;
mean = {l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12}; (*example data, maybe more*);
stdev = {m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12};
stat = {n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12};
labels = {"params", "axes", "mean\[PlusMinus]stdev", "other stat"};
My data format is as follows:
expr = MapThread[{#1, {#2, #3}, #4} &, {Flatten@
Table[axes, {i, 1, Length@params}], mean, stdev, stat}];
mytable = MapThread[{#1, #2} & , {params, Partition[expr, 3]}];
Visualizing the table:
TableForm[mytable]
I’ve been banging my head on how to format this table using Grid while maintaining the general structure of the table.
Q1. What is the best way to convert this from TableForm to a Grid.
Q2. Is there a better data structure I could use that would allow me to use TableForm or Grid interchangeably?
Related Question:
Grid
? AreColumns/Rows
allowed? $\endgroup$ – Kuba♦ Mar 3 '14 at 22:04