cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

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

Script: How to send a group of columns to selection on FitYbyX?

 

Wondering if this is possible. I have a bunch of columns I've grouped together and want to standardize a script that will send all the columns in a group to the Yresponse. Each instance of this data table will have a variable amount of columns and the names will be changing and not fixed.

 

I'd love to just say: Send this group to the Yresponse.

 

aliegner1_0-1624652076193.png

 

3 REPLIES 3
Craige_Hales
Super User

Re: Script: How to send a group of columns to selection on FitYbyX?

dt = Open( "$SAMPLE_DATA/Cities.jmp" );
dt << group columns( "xy", {:X, :y} );
dt<<Bivariate( Y( :OZONE ), X( dt<<get column group( "xy" ) ) );
Craige
aliegner1
Level IV

Re: Script: How to send a group of columns to selection on FitYbyX?

wondering how I could script it to send all the column groups to the plot?

 

How to do this dynamically? Is there a way to generate a list of the column groups, and then send that list to the X()?

Craige_Hales
Super User

Re: Script: How to send a group of columns to selection on FitYbyX?

The scripting index shows a function you could use to get the column group names. You could use each of those names to call the get column group method and build a full list to pass to the platform you are running.  Roughly:

// untested
groupnames = dt<<getcolumngroupnames;
biglist={};
for(igroup=1,igroup<=nitems(groupnames),igroup+=1,
   insertinto(biglist, dt<<getcolumngroup( groupnames[igroup] ));
);
show(biglist);
... X(biglist) ...

scripting indexscripting index

Craige

Recommended Articles