- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Table summary - Subgroups
The Subgroup option in Table/Summary is cool to get separate statistics for subgroups of the selected groups.
When several columns are selected as subgroups, all possible combinations show up in an hierarchical list.
For the example below, every single day of the week X every single day of the month gets a subgroup, ending up with 7 * 31 = 271 subgroups (dom, dow)
Is there an option to tell Table/Summary that subgroups should not be hierarchical/intersected, but just put next to each other?
Or do I have to generate the summary tables separately and join them later to get such a summary?
Open( "$SAMPLE_DATA/Airline Delays.jmp" );
Data Table( "Airline Delays" ) << Summary(
Group( :Airline ),
N,
Subgroup( :Day of Week, :Day of Month ),
Freq( "None" ),
Weight( "None" )
);
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Table summary - Subgroups
Yes you would have to run separage Summary Platforms and then Join them together to get what you want, or you could run a Tabulate Platform and get what you want in one step.
Names Default To Here( 1 );
dt = New Table( "year/day",
add rows( 200 ),
New Column( "Airline",
character,
set each value(
aList = {"Delta", "Northwest"};
aList[Random Integer( 1, 2 )];
)
),
New Column( "day",
character,
set each value(
dList = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
dList[Random Integer( 1, 7 )];
)
),
New Column( "n", ordinal, set each value( Random Integer( 1, 12 ) ) )
);
tab =Tabulate(
Add Table(
Column Table( Grouping Columns( :day ) ),
Column Table( Grouping Columns( :n ) ),
Row Table( Grouping Columns( :Airline ) )
)
);
tab<<make into data table;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Table summary - Subgroups
Hi @txnelson, thank you for the ultra-fast response.
One example where Tabulate is really ahead of Table/Summary
nice flexibility of hierarchical and side-by-side grouping and subgrouping
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Tabulate(
Add Table(
Column Table( Grouping Columns( :sex, :age ) ),
Row Table( Grouping Columns( :name ) )
)
);
dt << Tabulate(
Add Table(
Column Table( Grouping Columns( :sex ) ),
Column Table( Grouping Columns( :age ) ),
Row Table( Grouping Columns( :name ) )
)
);
dt <<Tabulate(
Add Table(
Column Table( Grouping Columns( :name ) ),
Row Table( Grouping Columns( :sex ) ),
Row Table( Grouping Columns( :age ) )
)
);
dt <<Tabulate(
Add Table(
Column Table( Grouping Columns( :name ) ),
Row Table( Grouping Columns( :sex ) ,
Grouping Columns( :age ) )
)
);
But it has so many disadvantages ...
From my point of view it makes sense to add this flexibility (hierarchical vs. side-by-side groups and subgroups) also to Table/Summary
- here is the wish:
Table/Summary option: side-by-side (sub)groups
let's hope that JMP Dev teams thinks alike ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Table summary - Subgroups
Yes you would have to run separage Summary Platforms and then Join them together to get what you want, or you could run a Tabulate Platform and get what you want in one step.
Names Default To Here( 1 );
dt = New Table( "year/day",
add rows( 200 ),
New Column( "Airline",
character,
set each value(
aList = {"Delta", "Northwest"};
aList[Random Integer( 1, 2 )];
)
),
New Column( "day",
character,
set each value(
dList = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
dList[Random Integer( 1, 7 )];
)
),
New Column( "n", ordinal, set each value( Random Integer( 1, 12 ) ) )
);
tab =Tabulate(
Add Table(
Column Table( Grouping Columns( :day ) ),
Column Table( Grouping Columns( :n ) ),
Row Table( Grouping Columns( :Airline ) )
)
);
tab<<make into data table;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Table summary - Subgroups
Hi @txnelson, thank you for the ultra-fast response.
One example where Tabulate is really ahead of Table/Summary
nice flexibility of hierarchical and side-by-side grouping and subgrouping
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Tabulate(
Add Table(
Column Table( Grouping Columns( :sex, :age ) ),
Row Table( Grouping Columns( :name ) )
)
);
dt << Tabulate(
Add Table(
Column Table( Grouping Columns( :sex ) ),
Column Table( Grouping Columns( :age ) ),
Row Table( Grouping Columns( :name ) )
)
);
dt <<Tabulate(
Add Table(
Column Table( Grouping Columns( :name ) ),
Row Table( Grouping Columns( :sex ) ),
Row Table( Grouping Columns( :age ) )
)
);
dt <<Tabulate(
Add Table(
Column Table( Grouping Columns( :name ) ),
Row Table( Grouping Columns( :sex ) ,
Grouping Columns( :age ) )
)
);
But it has so many disadvantages ...
From my point of view it makes sense to add this flexibility (hierarchical vs. side-by-side groups and subgroups) also to Table/Summary
- here is the wish:
Table/Summary option: side-by-side (sub)groups
let's hope that JMP Dev teams thinks alike ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Table summary - Subgroups
Just curious - what are the disadvantages of Tabulate? I've always found it superior to Table Summary and as flexible as I need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Table summary - Subgroups
One disadvantage is the additional steps it takes to output a summary data table, in comparison to the Summary Platform. If one is just going to use Tabulate as a device to create a new data table, there should be an check box on the dialog box that when checked, does not display a report window, and automatically generates the output data table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Table summary - Subgroups
additional disadvantages are listed in the wish
Table/Summary option: side-by-side (sub)groups
- to motivate why it makes sense to close this tiny gap