This version of the Help is no longer updated. See JMP.com/help for the latest version.

.
Scripting Guide > Scripting Platforms > Specify Which Columns to Analyze
Publication date: 07/30/2020

Specify Which Columns to Analyze

If you created your script interactively, you already specified columns in the launch window, so there is no need to specify them again. However, when creating a script from scratch, you normally want to specify the columns to analyze. For example, the following line launches the Distribution platform and specifies the height and weight columns as the Y variables:

Distribution( Y( height,weight ));

Create Column References

Tip: To see all the messages you can send to a column, go to Help > Scripting Index > Data Table > Column Scripting.

Creating a column reference enables you to access and send messages to the column. If you store each column reference in a JSL variable, you can use the variables instead of column names in the Y and X roles and elsewhere in the script.

For example, using Big Class.jmp, the following lines create Ycol as a column reference for weight, and Xcol as a column reference for height. The last line sends a message to Xcol to get the data type.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Ycol = Column( "weight" );
Xcol = Column( "height" );
Xcol << Get Data Type;

In the log, “Numeric” is output for the data type of the Xcol (height column).

Referring to a column reference with the : scoping operator (rather than plain text) is convenient in scripts saved to a data table. If the columns are renamed in the data table, the column references in the script are updated.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).