cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

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