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
Level I

JMP Add in



I created a Add in Tab in JMP. One of my functions is to delete empty cols. However when I run the Add in on one of my tables it does not work. 


This is my script:

dt = Current Data Table();

For( i = N Col( dt ), i >= 1, i--,

     If( (Col N Missing( Column( i ) ) / N Row()) == 1,

     dt << delete columns( i )




For some reason it is not deleting empty cols.


Am I doing something wrong in the code?


Re: JMP Add in

A couple of ideas:


  1. Testing the ratio against 1 should work but I would use a test of the difference against 0.
  2. The Delete Columns message does not take an integer argument. It requires a column reference, so use Column( 1 ) as the argument instead.
Learn it once, use it forever!
Article Labels

    There are no labels assigned to this post.