turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- JMP scripting

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 4:00 AM
(2683 views)

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

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 4:28 AM
(4872 views)

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**;

5 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 4:28 AM
(4873 views)

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**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 4:47 AM
(2526 views)

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 6:15 AM
(2526 views)

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 6:23 AM
(2526 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Aug 19, 2018 2:57 AM
(272 views)

Simple removal formula problem, I always find the master code to solve.thank you