cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

How do I stack columns using a numerical range of columns in a script?

I know this is probably an easy one, but I've been struggling with this for the past 3 hours...

Using JSL, how do I stack columns using a numerical range? for example stack columns 3 to 16.

 

Thank you!!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jasean
Staff

Re: How do I stack columns using a numerical range of columns in a script?

 You can use a matrix to specify the columns in the stack command.  Here is an example using a sample table:

 

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

StackDT = dt << Stack(
	columns( 5::10 ),
	Source Label Column( "Label" ),
	Stacked Data Column( "Data" ),
	Drop All Other Columns( 1 )
);

View solution in original post

2 REPLIES 2
Jasean
Staff

Re: How do I stack columns using a numerical range of columns in a script?

 You can use a matrix to specify the columns in the stack command.  Here is an example using a sample table:

 

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

StackDT = dt << Stack(
	columns( 5::10 ),
	Source Label Column( "Label" ),
	Stacked Data Column( "Data" ),
	Drop All Other Columns( 1 )
);
Lavik17
Level III

Re: How do I stack columns using a numerical range of columns in a script?

Thanks @Jasean !!!

Recommended Articles