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
skratchzero
Level II

How do I calculate a new column with row-dependent operations determined by a grouping label?

I created a stacked table that has a column X corresponding to x-coordinates, a column Label with a grouping label, and finally the Data column. Suppose the set of x-coordinates shared for all collected data are [1,2,3,4,5,6,7,8,9,10], there are three groups A,B,C, and the data are arbitrary numbers. I want to make a new column where the value from Data is normalized within each group (A, B, C) by the value from that group at a specific coordinate, let's say X=3. In other words, for every row where Label = A, divide Data by the value of Data where X=3 AND Label=A. Repeat for B and C. I can think of approaches with if and for loops, but I suspect that is a pretty inefficient way to do the calculation at scale.

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XIII

Re: How do I calculate a new column with row-dependent operations determined by a grouping label?

3 REPLIES 3
hogi
Level XIII

Re: How do I calculate a new column with row-dependent operations determined by a grouping label?

use the Normalization GUI 

hogi
Level XIII

Re: How do I calculate a new column with row-dependent operations determined by a grouping label?

If you prefer a script: 
use the GUI once to create a normalized column, then steal the code.

hogi_2-1719608492311.png

 

 

skratchzero
Level II

Re: How do I calculate a new column with row-dependent operations determined by a grouping label?

Wow that's exactly what I needed, thank you!

Recommended Articles