BookmarkSubscribeRSS Feed
wilkap

Community Trekker

Joined:

Aug 29, 2014

I have a script that runs perfectly in JMP 12.0 but it doesn't work properly withJMP 12.1 or JMP 12.1 Pro.

The following script works perfectly in JMP 11 and JMP 12.0, but it only produces blank report windows in JMP 12.1 and JMP 12.1 Pro:

dt = Current Data Table();

nco = n col(dt);

modelscript = dt << Get Property("Model");

Insert Into(modelscript,Expr(Run));

obj = Eval(modelscript);

obj << Residuals();

obj << close window;

ncf = n col(dt);

rc = ncf - nco;

for (idx = ncf,idx>nco,idx--,

  ColName = Column(idx) << Get Name;

  Distribution(

Column( Eval(ColName) ),

  Quantiles( 0 ),

  Summary Statistics( 0 ),

  Histogram( 0 ),

  Outlier Box Plot( 0 ),

  Normal Quantile Plot( 1 ),

  SendToReport(

  Dispatch(

  {},

  "Distributions",

  OutlineBox,

  {Set Title( "Normal Probability Plot" )}

  )

  )

  );

);

for (idx = ncf,idx>nco,idx--,

  dt<<delete column(idx); // delete residual columns

);

The problem appears to be with the line in red.  If I explicitly name a column, it works correctly.

Does anyone know what tI can do to make this script run in JMP 12.1?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
wilkap

Community Trekker

Joined:

Aug 29, 2014

Solution

Re: I have a script that runs perfectly in JMP 12.0 but it doesn't work properly withJMP 12.1 or JMP 12.1 Pro.

Thank you for looking at this, Craig.

I tried your advice but it did not help.  After a lot of playing around I discovered that JMP 12.1 does not allow the plots to exist after the data columns are deleted.  I journaled the plots and then closed the original windows to solve the problem.

For anyone who is interested, this script works:

for (idx = ncf,idx>nco,idx--,

  np = Expr(

  CName = Column Name(idx);

   Distribution(

    Continuous Distribution(

      Column( CName ),

      Quantiles( 0 ),

      Summary Statistics( 0 ),

      Histogram( 0 ),

      Outlier Box Plot( 0 ),

      Normal Quantile Plot( 1 ),

      SendToReport(

      Dispatch(

      {},

      "Distributions",

      OutlineBox,

      {Set Title( "Normal Probability Plot" )}

      ),

    )

   );

  );

  );

  np = Eval(np);

  jour = np << Get Journal;

  New Window("Normal Probability Plot", Journal Box(jour));

  np << Close Window;

);

for (idx = ncf,idx>nco,idx--,

  dt<<delete column(idx); // delete residual columns

);

2 REPLIES
Craige_Hales

Staff

Joined:

Mar 21, 2013

Re: I have a script that runs perfectly in JMP 12.0 but it doesn't work properly withJMP 12.1 or JMP 12.1 Pro.

try adding an explicit data table: ColName = Column( dt, idx) << Get Name;


If it is still a problem, print the value in ColName after the assignment, before the Distribution and see what's wrong.



Craige
wilkap

Community Trekker

Joined:

Aug 29, 2014

Solution

Re: I have a script that runs perfectly in JMP 12.0 but it doesn't work properly withJMP 12.1 or JMP 12.1 Pro.

Thank you for looking at this, Craig.

I tried your advice but it did not help.  After a lot of playing around I discovered that JMP 12.1 does not allow the plots to exist after the data columns are deleted.  I journaled the plots and then closed the original windows to solve the problem.

For anyone who is interested, this script works:

for (idx = ncf,idx>nco,idx--,

  np = Expr(

  CName = Column Name(idx);

   Distribution(

    Continuous Distribution(

      Column( CName ),

      Quantiles( 0 ),

      Summary Statistics( 0 ),

      Histogram( 0 ),

      Outlier Box Plot( 0 ),

      Normal Quantile Plot( 1 ),

      SendToReport(

      Dispatch(

      {},

      "Distributions",

      OutlineBox,

      {Set Title( "Normal Probability Plot" )}

      ),

    )

   );

  );

  );

  np = Eval(np);

  jour = np << Get Journal;

  New Window("Normal Probability Plot", Journal Box(jour));

  np << Close Window;

);

for (idx = ncf,idx>nco,idx--,

  dt<<delete column(idx); // delete residual columns

);