キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
言語を選択 翻訳バーを非表示

Process Capability

 

Hello,

Trying to add a list of the variables (“Process Variables”) in Process Capability plot.

It works for single item from the list, but it does not work for whole list.

 

lTest = Data Table("dtGoal") << get column names( numeric);

 

Data Table("dtGoal") << Process Capability(

       Process Variables( eval(lTest[i]) ), // it works for any i

//  Process Variables( eval(lTest) ),  // does not work

 

_ _ _ _ _

};

 

Thanks

 

1 件の受理された解決策

受理された解決策
txnelson
Super User

Re: Process Capability

Here is a working version of the script.  It bypasses the requirement to add the spec limits to the platform code by moving the limits into column properties for the columns in the data table.

Names Default To Here( 1 );

dt = Open( "$sample_data/big class.jmp" );

dtSpecLimits = New Table( "MySpecLimits",

       Add Rows( 3 ),

       New Column( "Parameter", Character, Nominal, Set Values( {"height", "weight", "age"} ) ),

       New Column( "LSL", Continuous, Set Values( [0, 0, 0] ) ),

       New Column( "Target", Continuous, Set Values( [50, 100, 50] ) ),

       New Column( "USL", Continuous, Set Values( [99, 200, 100] ) )

);

//dtSpecLimits << Save( "C:\Users\user\Documents\MySpecLimits.jmp" );

ltest = dt << getcolumnnames( numeric );

Substitute Into( ltest, Expr( List() ), Expr( Process Variables ) );

// Process the Spec Limits and add them as column properties to the data table

For( i = 1, i <= N Rows( dtSpecLimits ), i++,

       Eval(

              Substitute(

                           Expr(

                      __var__ << set property(

                                         "Spec Limits",

                                         {LSL( __LSL__ ), Target( __Target__ ), USL( __USL__ ), show limits( 1 )}

                                  )

                           ),

                     Expr( __var__ ), Parse( "dt:" || dtSpecLimits:Parameter ),

                     Expr( __LSL__ ), dtSpecLimits:LSL,

                     Expr( __Target__ ), dtSpecLimits:Target,

                     Expr( __USL__ ), dtSpecLimits:USL,

      

              )

       )

);

Eval(

       Substitute(

                     Expr(

                 dt << Process Capability( FIXME(), Goal Plot( 1 ), Capability Index Plot( 1 ) )

                     ),

              Expr( FIXME() ),

                     Name Expr( ltest ) // ...with ltest

       )

);

Jim

元の投稿で解決策を見る

4件の返信4
Craige_Hales
Super User

Re: Process Capability

I hope someone chimes in with a better way.  This should work... "FIXME()" is an arbitrary placeholder that the substitute() function can find and replace with the proper expression.

dt = Open( "$sample_data/big class.jmp" );

ltest = dt << getcolumnnames( numeric );

Substitute Into( ltest, Expr( List() ), Expr( Process Variables ) );

show(nameexpr(ltest)); // Process Variables(age, height, weight);

e = Substitute(

  Expr(

  Process Capability(

  FIXME(), // replace this...

  Spec Limits(

  height( LSL( 0 ), Target( 50 ), USL( 99 ) ),

  weight( LSL( 0 ), Target( 100 ), USL( 200 ) ),

  age( LSL( 0 ), Target( 50 ), USL( 100 ) )

  ),

  Goal Plot( 1 ),

  Capability Index Plot( 1 )

  )

  ),

  Expr( FIXME() ), Name Expr( ltest ) // ...with ltest

  );

show(nameexpr(e)); // Process Capability(Process Variables(age, height, weight), ...

eval(e); // open the platform

Craige

Re: Process Capability

Thanks. It works, but I cannot import spec limits from the saved Spec Limits Table.

Names Default To Here( 1 );

dt = Open( "$sample_data/big class.jmp" );

dtSpecLimits = New Table( "MySpecLimits",

Add Rows( 3 ),

New Column( "Parameter", Character, Nominal, Set Values( {"height", "weight", "age"} )),

New Column( "LSL", Continuous, Set Values  ( [0, 0, 0] ) ),

New Column( "Target", Continuous, Set Values( [50, 100, 50] ) ),

New Column( "USL", Continuous, Set Values  ( [99, 200, 100] ) )

);

dtSpecLimits << Save("C:\Users\user\Documents\MySpecLimits.jmp");

ltest = dt << getcolumnnames( numeric );

Substitute Into( ltest, Expr( List() ), Expr( Process Variables ) );

e = Substitute(

Expr(

Process Capability(

FIXME(), // replace this...

Spec Limits( Import Spec Limits("C:\Users\user\Documents\MySpecLimits.jm")),

Spec Limits Dialog( "No (skip columns with no spec limits)" ),

1,

Show Within Sigma Points( 1 ),

Show Overall Sigma Points( 0 ),

Shade Levels( 1 )

),

Expr( FIXME() ), Name Expr( ltest ) // ...with ltest

);

eval(e); // open the platform

txnelson
Super User

Re: Process Capability

Here is a working version of the script.  It bypasses the requirement to add the spec limits to the platform code by moving the limits into column properties for the columns in the data table.

Names Default To Here( 1 );

dt = Open( "$sample_data/big class.jmp" );

dtSpecLimits = New Table( "MySpecLimits",

       Add Rows( 3 ),

       New Column( "Parameter", Character, Nominal, Set Values( {"height", "weight", "age"} ) ),

       New Column( "LSL", Continuous, Set Values( [0, 0, 0] ) ),

       New Column( "Target", Continuous, Set Values( [50, 100, 50] ) ),

       New Column( "USL", Continuous, Set Values( [99, 200, 100] ) )

);

//dtSpecLimits << Save( "C:\Users\user\Documents\MySpecLimits.jmp" );

ltest = dt << getcolumnnames( numeric );

Substitute Into( ltest, Expr( List() ), Expr( Process Variables ) );

// Process the Spec Limits and add them as column properties to the data table

For( i = 1, i <= N Rows( dtSpecLimits ), i++,

       Eval(

              Substitute(

                           Expr(

                      __var__ << set property(

                                         "Spec Limits",

                                         {LSL( __LSL__ ), Target( __Target__ ), USL( __USL__ ), show limits( 1 )}

                                  )

                           ),

                     Expr( __var__ ), Parse( "dt:" || dtSpecLimits:Parameter ),

                     Expr( __LSL__ ), dtSpecLimits:LSL,

                     Expr( __Target__ ), dtSpecLimits:Target,

                     Expr( __USL__ ), dtSpecLimits:USL,

      

              )

       )

);

Eval(

       Substitute(

                     Expr(

                 dt << Process Capability( FIXME(), Goal Plot( 1 ), Capability Index Plot( 1 ) )

                     ),

              Expr( FIXME() ),

                     Name Expr( ltest ) // ...with ltest

       )

);

Jim

Re: Process Capability

Thanks everybody for the help.

おすすめの記事