<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Newb Question - Basic Sequencing in a column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Newb-Question-Basic-Sequencing-in-a-column/m-p/684754#M87069</link>
    <description>&lt;P&gt;I'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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried Sequence(0,100,25,8) and obviously 75 shows up as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I cannot for the life of me figure it out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chatgpt gave me the following code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it make absolutely no sense to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would appreciate if there's an easier way, or to just dumb it down for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Oct 2023 18:57:18 GMT</pubDate>
    <dc:creator>ControlAlpaca51</dc:creator>
    <dc:date>2023-10-08T18:57:18Z</dc:date>
    <item>
      <title>Newb Question - Basic Sequencing in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Newb-Question-Basic-Sequencing-in-a-column/m-p/684754#M87069</link>
      <description>&lt;P&gt;I'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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried Sequence(0,100,25,8) and obviously 75 shows up as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I cannot for the life of me figure it out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chatgpt gave me the following code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it make absolutely no sense to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would appreciate if there's an easier way, or to just dumb it down for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2023 18:57:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Newb-Question-Basic-Sequencing-in-a-column/m-p/684754#M87069</guid>
      <dc:creator>ControlAlpaca51</dc:creator>
      <dc:date>2023-10-08T18:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Newb Question - Basic Sequencing in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Newb-Question-Basic-Sequencing-in-a-column/m-p/684771#M87070</link>
      <description>&lt;P&gt;Easiest way to do this is to initialize new column with sequence data&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1696791266536.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57274iE846802EC93AF788/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1696791266536.png" alt="jthi_1-1696791266536.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;you can then get the script from log if you have JMP16+ and enhanced log enabled (if you need it)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Local({dt},
	dt = Data Table("Untitled 2");
	dt &amp;lt;&amp;lt; Begin Data Update &amp;lt;&amp;lt; Add Rows(40);
	For Each Row(dt, :Column 1 = Sequence(0, 100, 25, 1));
	dt &amp;lt;&amp;lt; End Data Update;
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1696791493322.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57275i1FD3DAD7AD15CF59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1696791493322.png" alt="jthi_0-1696791493322.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;(jmp is able to record this also)&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2023 18:58:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Newb-Question-Basic-Sequencing-in-a-column/m-p/684771#M87070</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-08T18:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Newb Question - Basic Sequencing in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Newb-Question-Basic-Sequencing-in-a-column/m-p/684783#M87071</link>
      <description>&lt;P&gt;ChatGPT answer is incorrect (JMP's indexing doesn't start from 0) and I would also write in different way in JMP anyway&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Using Match() is also most likely more clear in this case&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Match(Mod(Row() - 1, 4), // JMP indexing starts from 1 instead of 0
	0, 0,
	1, 25,
	2, 50,
	3, 100,
	.
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can add either of these as a formula in a formula column and then add as many rows as you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1696791887481.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57279iB789F0C10AEEB17C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1696791887481.png" alt="jthi_0-1696791887481.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Help button will open JMP Help page for that function &lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/numeric-functions-2.shtml?os=win&amp;amp;source=application#ww2850649" target="_blank" rel="noopener"&gt;Modulo(number, divisor)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2023 19:06:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Newb-Question-Basic-Sequencing-in-a-column/m-p/684783#M87071</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-08T19:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Newb Question - Basic Sequencing in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Newb-Question-Basic-Sequencing-in-a-column/m-p/684802#M87075</link>
      <description>&lt;P&gt;You can also just use &lt;CODE class=" language-jsl"&gt;Repat()&lt;/CODE&gt; and &lt;CODE class=" language-jsl"&gt;Set Values()&lt;/CODE&gt;, like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
nt = New Table( "test",
	&amp;lt;&amp;lt;New Column( "Sequence", "Numeric" ),
	&amp;lt;&amp;lt;Add Rows( 123 )
);

seq = Repeat( {0,25,50,100}, 100 );
seq = seq[1::N Rows( nt )];
nt:Sequence &amp;lt;&amp;lt; Set Values( seq )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Oct 2023 20:06:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Newb-Question-Basic-Sequencing-in-a-column/m-p/684802#M87075</guid>
      <dc:creator>ErraticAttack</dc:creator>
      <dc:date>2023-10-08T20:06:38Z</dc:date>
    </item>
  </channel>
</rss>

