automatic formulas<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />let's say I have 5 columns: A, B, C, D and E. I want to automatically generate new columns where each first four columns are divided by the fifth one, i.e. new columns are: A/E, B/E, C/E and D/E. Is there any way to do that automatically in JMP?
thanks
automatic formulasI never noticed the checkbox "Substitude Column Reference" before. Smart feature. Thanks!
automatic formulasThe way to do this without scripting is the "Substitute Column Reference" feature in Cols > Standardize Attributes. There's an example in the doc for making 9 new columns that is each the log of a previous column.
automatic formulasWith JSL, yes. It pays off to learn JSL if plan to use JMP a lot.
For your specific example it be done like this:
For( i = 1, i <= 4, i++,
Current Data Table() << New Column( Column( i ) << get name || "/E",
values( (Column( i ) << getas matrix)
(Column( 5 ) << get as matrix) )
)
);
Paste the code in a new script window, make sure your target table is the frontmost data table and hit run.