cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
UserID16644
Level V

User Input Tabulate Column

Is it possible to have a user-based column when tabulating data? I have a tabulated table but the grouping columns need to be based on the user input. I can't think of ways to do it, is it possible? pls help

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: User Input Tabulate Column

JMP has the functionality to request user input and then pass that information into whatever scripting is required.  I recommend that you take the time to read through the Scripting Guide.

Here is a very simple example to do what you want.  Far better interfaces can be developed, but this should give you a start

Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = New Window( "Col List Box Example",
	Text Box( "Select the Grouping Columns" ),
	Col List Box( all, width( 250 ), maxSelected( 1 ) ),
	fontobj = lb = Col List Box( character ),
	OKbb = Button Box( "OK",
		theColumns = lb << get items;
		nw << close window;

		Tabulate(
			Show Control Panel( 0 ),
			Add Table(
				Column Table( Analysis Columns( :height, :weight ), Statistics( Mean ) ),
				Row Table( Grouping Columns( eval(theColumns) ) )
			)
		);
	)
);
Jim

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: User Input Tabulate Column

JMP has the functionality to request user input and then pass that information into whatever scripting is required.  I recommend that you take the time to read through the Scripting Guide.

Here is a very simple example to do what you want.  Far better interfaces can be developed, but this should give you a start

Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = New Window( "Col List Box Example",
	Text Box( "Select the Grouping Columns" ),
	Col List Box( all, width( 250 ), maxSelected( 1 ) ),
	fontobj = lb = Col List Box( character ),
	OKbb = Button Box( "OK",
		theColumns = lb << get items;
		nw << close window;

		Tabulate(
			Show Control Panel( 0 ),
			Add Table(
				Column Table( Analysis Columns( :height, :weight ), Statistics( Mean ) ),
				Row Table( Grouping Columns( eval(theColumns) ) )
			)
		);
	)
);
Jim
UserID16644
Level V

Re: User Input Tabulate Column

Not sure if it's my JMP Version (JMP15) but it's not working for me

txnelson
Super User

Re: User Input Tabulate Column

It works fine under JMP 15, running Windows 10.

Here is the first screen

txnelson_0-1647410582870.png

I then select columns Name and Age and move them into the selection area

txnelson_1-1647410659706.png

Finally I click on OK and get the following results

txnelson_2-1647410725103.png

 

 

Jim
UserID16644
Level V

Re: User Input Tabulate Column

Worked well. Thanks! 

Recommended Articles