Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
akuznetsovaapl
Level II

Calling Standardize Attributes function on multiple Columns in Scripting

Hi,

 

I'd like to be able to call Standardize Attributes on multiple columns in JSL scripting.

I tried searching but failed to find a function that would allow me to apply standardize attributes.

 

On a side note, if the above function exists, how can I retrieve a list of selected columns from a table. This would allow me to select the columns and then run the script to change Type from Character to Numerical Continuous for example.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
txnelson
Super User

Re: Calling Standardize Attributes function on multiple Columns in Scripting

I am not aware of a Standardize Attributes function in JSL.  I assume that because it is so simple to loop through a list of column to apply the same attribute, that it doesn't make sense to have a stand alone function.

To get a list of selected column just use

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Go To( :weight );
names = dt << Get Selected Columns;
Show( names );

The above example is taken directly from the Get Selected Columns entry from the Scripting Index.

     Help==>Scripting Index

Jim

View solution in original post

Highlighted

Re: Calling Standardize Attributes function on multiple Columns in Scripting

Please see Help > Books > Scripting Guide. There are chapters devoted to scripting data column objects. You will need to identify the column attributes that you want to change or set and then find the message that accomplishes the task. For example, I can change the format of the numeric data:

 

Names Default to Here( 1 );

// get example for the data table
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// change the format attribute
:height << Format( "Fixed Dec", 8, 3 );
Learn it once, use it forever!

View solution in original post

3 REPLIES 3
Highlighted
txnelson
Super User

Re: Calling Standardize Attributes function on multiple Columns in Scripting

I am not aware of a Standardize Attributes function in JSL.  I assume that because it is so simple to loop through a list of column to apply the same attribute, that it doesn't make sense to have a stand alone function.

To get a list of selected column just use

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Go To( :weight );
names = dt << Get Selected Columns;
Show( names );

The above example is taken directly from the Get Selected Columns entry from the Scripting Index.

     Help==>Scripting Index

Jim

View solution in original post

Highlighted
akuznetsovaapl
Level II

Re: Calling Standardize Attributes function on multiple Columns in Scripting

I'm new and don't know where to look to change column attributes, can you please show me how/where?

Highlighted

Re: Calling Standardize Attributes function on multiple Columns in Scripting

Please see Help > Books > Scripting Guide. There are chapters devoted to scripting data column objects. You will need to identify the column attributes that you want to change or set and then find the message that accomplishes the task. For example, I can change the format of the numeric data:

 

Names Default to Here( 1 );

// get example for the data table
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// change the format attribute
:height << Format( "Fixed Dec", 8, 3 );
Learn it once, use it forever!

View solution in original post

Article Labels

    There are no labels assigned to this post.