cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
the_qrv
Level I

Use of N Categories(:column) from Summary table for script computations

Hi, I would like to inquire how to make use of N Categories(:X) resut in summary to make mathematical operations via script. It seems the :N Categories (:column) can not be used directly to do the computations, even if I rename or make another numeric column, blk_count. Here is what i have:

dt_ax = dt_X << Summary (

          Group (:abx),

          N Categories (:blk),

          Link to original table (0));

dt_X << Update (

          with (dt_ax),

          Match Columns(:abx = :abx),

          Ignore missing);

close(dt_ax, no save);

dt_X << New column("blk_count",

          Numeric,

          continuous,

          << set each value(blk_count == :N Categories( :blk ));

Appreciate all your inputs! Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Byron_JMP
Staff

Re: Use of N Categories(:column) from Summary table for script computations

This will give you the number of levels for a specified column:

dt_X<<new column("N Levels of blk", formula(

Summarize( x = by( :blk ) );

N Items( x );));

If you wanted to know how many rows are in each level then the Col Number function work:

Col Number( :blk, :blk )

JMP Systems Engineer, Health and Life Sciences (Pharma)

View solution in original post

2 REPLIES 2
Byron_JMP
Staff

Re: Use of N Categories(:column) from Summary table for script computations

This will give you the number of levels for a specified column:

dt_X<<new column("N Levels of blk", formula(

Summarize( x = by( :blk ) );

N Items( x );));

If you wanted to know how many rows are in each level then the Col Number function work:

Col Number( :blk, :blk )

JMP Systems Engineer, Health and Life Sciences (Pharma)
the_qrv
Level I

Re: Use of N Categories(:column) from Summary table for script computations

Thanks Byron for the help!

Recommended Articles