Newb Question - Basic Sequencing in a columnI'm a beginner in JMP and coding as a whole. I'm trying to figure out how I can make sequence of 0, 25, 50, 100, to repeat 8 times.
I tried Sequence(0,100,25,8) and obviously 75 shows up as well.
And I cannot for the life of me figure it out.
Chatgpt gave me the following code:
If(Mod(Row(), 4) == 0, 0, If(Mod(Row(), 4) == 1, 25, If(Mod(Row(), 4) == 2, 50, If(Mod(Row(), 4) == 3, 100, 0))))
And it make absolutely no sense to me.
I would appreciate if there's an easier way, or to just dumb it down for me.
Thank you for your help!
Basic Data Analysis and ModelingDesign of ExperimentsRe: Newb Question - Basic Sequencing in a columnEasiest way to do this is to initialize new column with sequence data

you can then get the script from log if you have JMP16+ and enhanced log enabled (if you need it)
Local({dt},
dt = Data Table("Untitled 2");
dt << Begin Data Update << Add Rows(40);
For Each Row(dt, :Column 1 = Sequence(0, 100, 25, 1));
dt << End Data Update;
);
Edit: misread the question, you don't want to have 75 there. One option then is to select one 75, right click and select matching cells and delete those

(jmp is able to record this also)
Re: Newb Question - Basic Sequencing in a columnChatGPT answer is incorrect (JMP's indexing doesn't start from 0) and I would also write in different way in JMP anyway
If(Mod(Row() - 1, 4) == 0,
0
, Mod(Row() - 1, 4) == 1,
25
, Mod(Row() - 1, 4) == 2,
50
, Mod(Row() - 1, 4) == 3,
100
)
Using Match() is also most likely more clear in this case
Match(Mod(Row() - 1, 4), // JMP indexing starts from 1 instead of 0
0, 0,
1, 25,
2, 50,
3, 100,
.
)
You can add either of these as a formula in a formula column and then add as many rows as you need.
Scripting Index is very helpful if you need to know what the functions do, it does also provide examples you can run. It can be found from JMP's Help menu

Help button will open JMP Help page for that function Modulo(number, divisor)
Re: Newb Question - Basic Sequencing in a columnYou can also just use Repat() and Set Values(), like this:
Names Default to Here( 1 );
nt = New Table( "test",
<<NEW column=""></NEW>