As above
jkelleyjr
If you created the subset interactively, then you could do the following.
1. Notice that each table spawned from its parent ends up with a Table Script called "Source". Click on the red triangle of "Source" and select "Copy".
2. Go back to the parent table and right-click in the upper-left corner and select "Paste":
3. The "Source" script for the subset is now a Table script in the parent table. You can always rename it as you like.
-PBZ
Here is a sample script that will do the trick:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dt << select where( :SEX == "F" );
dtsubset = dt << subset( selected rows( 1 ), selected columns( 0 ), output table name( "The Subset" ) );
Eval(Substitute(
Expr(
dt << new script( "Subset Script", __script__ )
),
Expr( __script__ ), dtsubset << get script
));
@PBZ Perfect, exactly what I was looking for !!
Although I was hoping that functionality would be built into the red triangle in the sub-setted table natively, i.e.:
Subset of Data Table (red triangle) -> Save Subset Table to Data Table