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
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 4:28 AM
(5577 views)
| Posted in reply to message from edzard_van_sant 12/03/2015 07:00 AM

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
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 4:28 AM
(5578 views)
| Posted in reply to message from edzard_van_sant 12/03/2015 07:00 AM

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
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 6:15 AM
(3231 views)
| Posted in reply to message from edzard_van_sant 12/03/2015 07:47 AM

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
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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