cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
MFVIT
Level IV

JSL for converting a formula to its results

Hello,

I have the following jsl code 

 

dt << New Column( "I (%)", (:Mean * 100) );

 

that takes a column (Mean), multiplies by 100 and create a new column called I(%) with the formula.

 

I do not want the formula but just the result of the calculation in the new column. How can I do this?

 

Many thanks.

13 REPLIES 13
MFVIT
Level IV

Re: JSL for converting a formula to its results

Thank you very much, very useful.
MFVIT
Level IV

Re: JSL for converting a formula to its results

Many thanks.

Re: JSL for converting a formula to its results

You do not need a formula at all. I recommend not using column formulas when scripting unless you want the values to dynamically change after the script is done. So your case could be solved this way:

 

dt << New Column( "I (%)", Numeric, Continuous, Values( (:Mean << Get Values) * 100) );
Craige_Hales
Super User

Re: JSL for converting a formula to its results

Cool!

Craige

Recommended Articles