cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
hogi
Level XI

Initialize data - very useful - but fragile!

Hi, the initialize data settings in the column menu are quite useful.
Who managed to control the settings via JSL?

In the scripting index, I just found:

hogi_2-1723308563244.png

which fits to "constant" mode. How can I set the other modes?

 

hogi_0-1723307960193.png

4 REPLIES 4
jthi
Super User

Re: Initialize data - very useful - but fragile!

Only constant and today are specifically using initial data, rest are building them using for each row (JMP action recorder seems to be recording actions for Constant and Today data initialization incorrectly).

-Jarmo
hogi
Level XI

Re: Initialize data - very useful - but fragile!


@jthi wrote:

Only constant and today are specifically using initial data, rest are building them using for each row 


Ah right, good point. Surprising ...


Today() is really (!!!) useful.
Every new row is added with the current timestamp -  some hidden "magic" which is not visible from the script for the data table.

hogi_3-1723316051681.png

A pity that Sequence Data and Random are just accessible in the beginning - no chance to trigger them later:
hogi_0-1723314837949.png

And when a user changes the setting to
Missing/Empty or misses the chance to define a  Initialize Date setting before he writes the first value into the column - he loses his chance to see the menu. 

So, some things that could be improved in a future version of JMP ...
On the other hand, I don't know id other JMP users use this feature
- and how many of them feel limited by the current functionality.

MathStatChem
Level VI

Re: Initialize data - very useful - but fragile!

When I use JSL to create columns and specify values for those columns, I tend to be very specific and do things like

dt=New Table();

c=dt<<New Column("Random Normal Data");
dt << Add Rows(20);

c << Set Values(J(nrows(dt), 1, Random Normal()));

c=dt << New Column("All Ones");
c << set values(J(nrows(dt), 1));

dt << New Column("All A's", Character);

for each row(
	:"All A's"n = "A"
);

MathStatChem_0-1723354883309.png

 

hogi
Level XI

Re: Initialize data - very useful - but fragile!

Set each value is very convenient.

 

:Random Normal Data << Set Each Value(Random Normal());
: "All A's"n << set each value("A");


It can also be used during the creation of the column: New Column("col", set each value()).

 

I hope it keeps it's versatility:

Make using formula expressions in Set Each Value and using expressions as first argument in Col stat...