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.
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
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 );
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
I'm new and don't know where to look to change column attributes, can you please show me how/where?
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 );