cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

JMP Scripting

Hello I am new to JMP Scripting and wandering if there is way to use regular expressions ?

I have huge tables and trying to stack them with JMP.

So any help on how would i ...

Data Table( "temp" ) << Stack(

columns(

  :Name( "ABC0(1)" ),

  :Name( "ABC0(2)" ),

  :Name( "ABC0(128)" )

),

Source Label Column( "Label" ),

Stacked Data Column( "Data" ),

output table("npt")

);

I have DATA = ABC0 to 127 and (1 to 128)... writing :Name takes too many lines...

Thanks,

Nevil

1 REPLY 1
pmroz
Super User

Re: JMP Scripting

Here's one way to do it.  Basically you build a string and then execute it.

stack_expr = "\[Data Table( "temp" ) << Stack( columns(]\";

nc = 128;    // Set for your table

for (i = 1, i <= nc, i++,

    k = char(i);

    stack_expr = stack_expr || evalinsert("\[ :Name( "ABC0(^k^)" ) ]\");

// Add the comma between columns, except for the last one

    if (i < nc,

        stack_expr = stack_expr || ", ";

    );

);

stack_expr = stack_expr ||

"\[Source Label Column( "Label" ),

   Stacked Data Column( "Data" ),

   output table("npt"))]\";

eval(parse(stack_expr));

Recommended Articles