I would like to define a simple function to automatically show all rows in a Dataset. Based on Taliesin Beynon's answer, I tried the following trivial snippet:
ClearAll[ShowDataset]
ShowDataset[{assoc__}, query__] :=
Block[{Dataset`$ElisionThreshold = Length[{assoc}]*4},
Dataset[Query[query]@{assoc}]
]
However, this doesn't work; the number of rows showed is still 16. On the other hand, Block does what it is supposed to do, because if I adjust the code to read
ClearAll[ShowDataset]
ShowDataset[{assoc__}, query__] :=
Block[{Dataset`$ElisionThreshold = Length[{assoc}]*4},
Dataset[Query[query]@{assoc}];
Dataset`$ElisionThreshold
]
It shows the correct number of rows. Is this expected behaviour? Is there another way to temporarily and automatically set Dataset`$ElisionThreshold?



ExampleData["Datasets"]. Additionally, when you say that your second code snippet showed "the correct number of rows", did you mean to say that it showed the correct value ofDataset`$ElisionThreshold? – MarcoB Oct 21 '15 at 15:17