Subscripting data tables is very handy but is it possible to use the "by" function in this (for example by( :age )) to pull all the names of people who have the same age into the column?
Here is an example:
I'd like to take all the names where the age is the same and concatenate them in a column.
One of the common next steps is then summarizing other columns by those concatenated names.
![2018-05-02_3-59-31.png 2018-05-02_3-59-31.png](https://community.jmp.com/t5/image/serverpage/image-id/10599i6CF1C5D84394262B/image-size/large?v=v2&px=999)
![2018-05-02_4-01-21.png 2018-05-02_4-01-21.png](https://community.jmp.com/t5/image/serverpage/image-id/10600iA95B1C6538B8642E/image-size/large?v=v2&px=999)
I've dug through and tried multiple approaches and I think I'm just missing something simple, but what I'm hoping is that there is a very straightforward way to do this using either subscription or something like
dt:name << get values(by(age)) and then either put that in a column or use it in a script.
I tried this as a formula column:
dt[Index( :first_row, :last_row ), {:name}]
And each subexpression provided the correct result to match your example
// fetch a list if character columns are involved.
// notice the matrix is reversing the order
dt[ 4::2, "name"]; // {"JACLYN", "JANE", "LOUISE"}
but I'm not able to get the actual list of names {"JACLYN", "JANE", "LOUISE"} to return in the column.
Thank you for any help,
Aron