cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

Make Into Data Table not working in Script

Rachael44
Level I

I'm running into issues trying to script making a Tabulate object into a new data table. I've tried both syntaxes below, but neither creates the table. I'm using this as one step in a larger workflow.

 

t2 = tbl << Tabulate(
	Add Table(
		Column Table( Grouping Columns( :Treatment ) ),
		Row Table(
			Analysis Columns(
				:"Attribute 1"n,
				:"Attribute 2"n,
				:"Attribute 3"n,
				:"Attribute 4"n,
				:"Attribute 5"n, :"Attribute 6"n,
				:"Attribute 7"n, :"Attribute 8"n,
				:"Attribute 9"n,
				:"Attribute 10"n, :"Attribute 11"n
			),
			Statistics( Mean )
		)
	),
	Local Data Filter(
		Mode( Show( 0 ) ),
		Add Filter( columns( :A or B), Where( :A or B == "A" ) )
	),
)) << Make Into Data Table();

and

t2 = tbl << Tabulate(
	Add Table(
		Column Table( Grouping Columns( :Treatment ) ),
		Row Table(
			Analysis Columns(
				:"Attribute 1"n,
				:"Attribute 2"n,
				:"Attribute 3"n,
				:"Attribute 4"n,
				:"Attribute 5"n, :"Attribute 6"n,
				:"Attribute 7"n, :"Attribute 8"n,
				:"Attribute 9"n,
				:"Attribute 10"n, :"Attribute 11"n
			),
			Statistics( Mean )
		)
	),
	Local Data Filter(
		Mode( Show( 0 ) ),
		Add Filter( columns( :A or B), Where( :A or B == "A" ) )
	),
));

Wait(1);

t2 << Make Into Data Table();

I'm on JMP 17.2.

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XII


Re: Make Into Data Table not working in Script

Hm, interesting.

In the first example, when you add some brackets it should work. Without the brackets you send the message to the table and not to the Tabulate object.

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

(dt << Tabulate(
		Add Table(
			Column Table( Analysis Columns( :height ) ),
			Row Table( Grouping Columns( :sex ) )
		)
	)) << Make Into Data Table();

 

The second option should work. Maybe there is a typo?

The easiest way:
use the gui, then go to the log and "steal the code" .

View solution in original post

2 REPLIES 2
hogi
Level XII


Re: Make Into Data Table not working in Script

Hm, interesting.

In the first example, when you add some brackets it should work. Without the brackets you send the message to the table and not to the Tabulate object.

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

(dt << Tabulate(
		Add Table(
			Column Table( Analysis Columns( :height ) ),
			Row Table( Grouping Columns( :sex ) )
		)
	)) << Make Into Data Table();

 

The second option should work. Maybe there is a typo?

The easiest way:
use the gui, then go to the log and "steal the code" .

Rachael44
Level I


Re: Make Into Data Table not working in Script

Adding the parentheses fixed it - all these issues were just from a typo. Thank you!