I have a table of real numbers and want to format a Grid such that the headlines are centered and the contents are aligned at the decimal point. MWE:
data = Table[RandomReal[{1, 100}], {i, 1, 5}, {j, 2}]
headers:
columns = {"one", "two"};
Rows:
rowsLabels = StringJoin["R", ToString[#]] & /@ Range[5]
rows = Flatten /@ ({rowsLabels, data}\[Transpose])
Table:
tab = Join[{Prepend[columns, "Text "]}, rows]
Then
Grid[tab,
Dividers -> {{2 -> True}, {2 -> True}},
Alignment -> {{Left, Center, Center}, {{Left, ".", "."}}, Baseline}]
delivers:
and
Grid[tab,
Dividers -> {{2 -> True}, {2 -> True}},
Alignment -> {{{Left, Center, Center}, {Left, ".", "."}}, Baseline}]
delivers:
So the second columns is fine, but the first not. Can anyone give me a hint on how I can achieve the desired result.