<?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 Re: JSL Script Continue Sequence to End of Table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Script-Continue-Sequence-to-End-of-Table/m-p/79690#M36788</link>
    <description>&lt;P&gt;If you just want to fill the column with the sequence 1, 2, ..., you can use this JSL:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=Current Data Table();
dt &amp;lt;&amp;lt; New Column("ABCD", Numeric, Continuous, Set Values(1::NRows(dt)));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The statement&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;a::b&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;,where a and b are integers, creates a vector of sequencial values from a to b, indexed by 1.&amp;nbsp; &amp;nbsp;More generally, a::b::increment returns [a a+increment a+2*increment ... b].&amp;nbsp; For example&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;2::20::2&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;returns&amp;nbsp;[2 4 6 8 10 12 14 16 18 20]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want a script that will contine the sequence based on the selected rows, that would be a little bit more work to create, I think.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Oct 2018 11:29:46 GMT</pubDate>
    <dc:creator>MathStatChem</dc:creator>
    <dc:date>2018-10-19T11:29:46Z</dc:date>
    <item>
      <title>JSL Script Continue Sequence to End of Table</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-Continue-Sequence-to-End-of-Table/m-p/79686#M36786</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am new to JSL script. Can anyone teach me how to write the script for below option, "Continue sequence to end of table". I would like to automate this process. I only able to find script to key in the first three rows as below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column("Time","Continuous", Set Values([1,2,3]));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then not sure how to automate it if I want to Continue sequence to end of table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pic1.JPG" style="width: 786px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/12929iBF5E335061CBDB63/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pic1.JPG" alt="Pic1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:30:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-Continue-Sequence-to-End-of-Table/m-p/79686#M36786</guid>
      <dc:creator>ReginaHong</dc:creator>
      <dc:date>2018-10-19T15:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script Continue Sequence to End of Table</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-Continue-Sequence-to-End-of-Table/m-p/79690#M36788</link>
      <description>&lt;P&gt;If you just want to fill the column with the sequence 1, 2, ..., you can use this JSL:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=Current Data Table();
dt &amp;lt;&amp;lt; New Column("ABCD", Numeric, Continuous, Set Values(1::NRows(dt)));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The statement&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;a::b&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;,where a and b are integers, creates a vector of sequencial values from a to b, indexed by 1.&amp;nbsp; &amp;nbsp;More generally, a::b::increment returns [a a+increment a+2*increment ... b].&amp;nbsp; For example&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;2::20::2&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;returns&amp;nbsp;[2 4 6 8 10 12 14 16 18 20]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want a script that will contine the sequence based on the selected rows, that would be a little bit more work to create, I think.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 11:29:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-Continue-Sequence-to-End-of-Table/m-p/79690#M36788</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2018-10-19T11:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script Continue Sequence to End of Table</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-Continue-Sequence-to-End-of-Table/m-p/79720#M36798</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="JMPScreenSnapz293.png" style="width: 301px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/12933i23B93409820DD96C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JMPScreenSnapz293.png" alt="JMPScreenSnapz293.png" /&gt;&lt;/span&gt;There are some functions available interactively that don't have JSL equivalents. Most of these are things that only make sense interactively. In this case, it's assumed that as a JSL author you can create the data you want as you want it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the pattern you're looking for you should examine the &lt;A href="https://www.jmp.com/support/help/14-1/row-functions-2.shtml#2737000" target="_blank"&gt;Row()&lt;/A&gt;,&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/14-1/row-functions-2.shtml#4883376" target="_blank"&gt;Count()&lt;/A&gt;, and&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/14-1/row-functions-2.shtml%232737000" target="_blank"&gt;Sequence()&lt;/A&gt; functions.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Table( "Sequences",
	Add Rows( 20 ),
	New Column( "Row",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Row() )
	),
	New Column( "Count",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Count( 10, 30, 21, 1 ) )
	),
	New Column( "Sequence",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Sequence( 100, 130, 0.5, 2 ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:55:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-Continue-Sequence-to-End-of-Table/m-p/79720#M36798</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2018-10-19T15:55:42Z</dc:date>
    </item>
  </channel>
</rss>

