NetLogo 7.0.0-beta2:

table:group-items

table:group-items list anonymous-reporter

Groups the items of the list based on the given reporter. The reporter should take a single argument, which will be the items of the list. Items that report the same thing when passed to the reporter will be grouped together. The results of the reporter will be used as the keys in the resulting table and the groups will be lists.

For example:

observer> show table:group-items range 10 [ num -> num mod 3 ]
observer: {{table: [[0 [0 3 6 9]] [1 [1 4 7]] [2 [2 5 8]]]}}

Take me to the full Table Extension Dictionary