Hi everyone,
I have a small problem but it seems that no one in the web have a solution for it, not specifically anyway.
I'm trying to change column Data Type from Numeric to Character during JSL run,
Just to be clear - I'm not trying to change Modeling Type - there are a lot of good examples for that in the web.
I'm trying to change the Data Type - (it seems no one manage to do yet).
thanks!
Go the Scripting Index, select Objects, and then scroll down to Data Table > Column Scripting. You'll find the method "Data Type" with the following example:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Wait( 2 );
dt:Age << Data Type( Character );
dt:Height << Data Type( Numeric, 2 );
This OP asked about changing data type using JSL. In case you're looking to do this interactively you can select the column and then choose Cols -> Column Info...
Then in the Column Info dialog box change the Data Type.
Go the Scripting Index, select Objects, and then scroll down to Data Table > Column Scripting. You'll find the method "Data Type" with the following example:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Wait( 2 );
dt:Age << Data Type( Character );
dt:Height << Data Type( Numeric, 2 );
Hi, thanks but its not working,
I want to change an exiting column -
according to few guide the commend suppose to look like this:
column("VALUE") << Data type( Numeric ) << Set Data Type ( Character)
but still, non is working....
Remove "Data type ( Numeric)", and remove the word SET. I would also include a variable that points to your dataset.
column("VALUE") << Data Type ( Character);
or better yet:
column(dt, "VALUE") << Data Type ( Character);
where dt points to your data table.
My original example shortened a bit:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
column(dt, "Height") << Data Type( Character );
Thanks!, It's working!!
This OP asked about changing data type using JSL. In case you're looking to do this interactively you can select the column and then choose Cols -> Column Info...
Then in the Column Info dialog box change the Data Type.