Subscribe Bookmark RSS Feed

JMP scripting

edzard_van_sant

Community Trekker

Joined:

Jun 4, 2014

I would like to script the conversion of results from a formula in a column to static numbers. Is that possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

If I understand correctly, you just have to delete the formula that generated the values (via the 'Column Info' dialog).

In JSL:

NamesDefaultToHere(1);

dt = NewTable("Test Remove Formula",

NewColumn("Values From Formula",Numeric, Continuous, Formula(RandomNormal())),

AddRows(10)

);

Wait(3);

Column(dt, "Values From Formula") << deleteFormula;

4 REPLIES
Solution

If I understand correctly, you just have to delete the formula that generated the values (via the 'Column Info' dialog).

In JSL:

NamesDefaultToHere(1);

dt = NewTable("Test Remove Formula",

NewColumn("Values From Formula",Numeric, Continuous, Formula(RandomNormal())),

AddRows(10)

);

Wait(3);

Column(dt, "Values From Formula") << deleteFormula;

edzard_van_sant

Community Trekker

Joined:

Jun 4, 2014

Thanks for pointing me in the right direction. I simplified your approach to

:Values From Formula << deleteFormula;


which worked like a charm.


As usual, the correct answer will come when the question is phrased correctly.

txnelson

Super User

Joined:

Jun 22, 2012

Your simplification should work great as long as JMP properly points to the correct data table.  I suggest that you scope the variable to ensure that there is no question as to what data table you are working with.

dt:Values From Formula << deleteFormula;

It is a good coding practice to remove the ambiguities.

Jim
edzard_van_sant

Community Trekker

Joined:

Jun 4, 2014

Point taken. In this case is the house brand version of a script. It will never be shared or used by the outside world.