Move column to first using JSL scriptHi JMP community
I seem to have a simple question.
I want to move a specific column to the first position using JSL script.
I started withselecting it
:"That's my column" << set selected (1) ; /*seemed OK*/
However, ...
move selected column ( (:"That's my column"), to first) ;
...just doesn't work. Could you help me solve this one?
Thanks a lot!
Re: Move column to first using JSL scriptHi txnelson
You saved my day. I'll check the syntax solutions first thing tomorrow.
Until then: Thanks a lot!
Newbie2
Re: Move column to first using JSL scriptThe JSL documentation in both the Scripting Index and in the Scripting Guide is confusing......I would even say it is wrong. However, the following JSL shows a couple of correct methods to do what you want to do:
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
:weight << set selected(1);
dt << move selected columns( To First );
// Or you can use this form
dt2=open("$SAMPLE_DATA/Trial1.jmp");
dt2 << move selected columns( {"yield"}, To First);