Hi All,
Can anyone highlight what are the differences between using "Formula" and "Set Each Value"? What are the pros and cons?
@ram, If you use the test script I put together below, you will be able to realize starting at a = 6, that set each value is more efficient .
a = 7; // Varied from 2 to 7 dt = New Table(); dt << Begin Data Update; dt << Add Rows(10^a); t1 = Tick Seconds(); dt << New Column("Test",Numeric,Continuous,Formula(5)); t2 = Tick Seconds(); dt << End Data Update; Print(t2-t1); t3 = Tick Seconds(); dt << New Column("Test",Numeric,Continuous,<< Set Each Value(a)); t4 = Tick Seconds(); Print(t4-t3);
However, it is important to note that Set Each Value can only achieve one objective unlike Formula which is much more versatile. So I don't know the exact objective of performing this comparison, but this is one way to look at it
I was basically looking for functionality comparison between set each value vs formula function
Set Each Value places the value specified into each cell for the column it is pointed at.
The Formula element is a dynamic element, that allows for the specifying of a script of any complexity desired. Additionally, a formula will be rerun anytime that components within the provided script(column values) are changed.
but if you delete formula property, then based on your statement both should be same. but i guess there are more intrinsic differences.
I concur with Jim.
As an interactive JMP user, my only way to compute values when making a new column is to use a formula. As a scripter, I have a choice between using a formula or using myriad other means of populating the new column. I never use a formula in a script unless the values must update due to dependencies that might change after the script has run.
The decision is as simple as that IMO. But I would never tell someone else to follow my way.