<?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 How to use JSL to repeat a sequence to the end of a data table? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-repeat-a-sequence-to-the-end-of-a-data-table/m-p/7376#M7370</link>
    <description>&lt;P&gt;I have a set sequence that I want to repeat to the end of a data table like you can do with the "Fill to End of Column" when you select rows where this can go on for an unspecified number of rows&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NewColumn("Part", Character, Values({"1-B","1-B","1-B","1-D","1-D","1-D",
  "1-F","1-F","1-F","1-H","1-H","1-H","1-J","1-J","1-J","1-L","1-L","1-L",
  "2-B","2-B","2-B","2-D","2-D","2-D",
  "2-F","2-F","2-F","2-H","2-H","2-H","2-J","2-J","2-J","2-L","2-L","2-L"}
));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Sep 2017 18:53:21 GMT</pubDate>
    <dc:creator>cmjewart</dc:creator>
    <dc:date>2017-09-18T18:53:21Z</dc:date>
    <item>
      <title>How to use JSL to repeat a sequence to the end of a data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-repeat-a-sequence-to-the-end-of-a-data-table/m-p/7376#M7370</link>
      <description>&lt;P&gt;I have a set sequence that I want to repeat to the end of a data table like you can do with the "Fill to End of Column" when you select rows where this can go on for an unspecified number of rows&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NewColumn("Part", Character, Values({"1-B","1-B","1-B","1-D","1-D","1-D",
  "1-F","1-F","1-F","1-H","1-H","1-H","1-J","1-J","1-J","1-L","1-L","1-L",
  "2-B","2-B","2-B","2-D","2-D","2-D",
  "2-F","2-F","2-F","2-H","2-H","2-H","2-J","2-J","2-J","2-L","2-L","2-L"}
));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 18:53:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-repeat-a-sequence-to-the-end-of-a-data-table/m-p/7376#M7370</guid>
      <dc:creator>cmjewart</dc:creator>
      <dc:date>2017-09-18T18:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fill to end of column in script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-repeat-a-sequence-to-the-end-of-a-data-table/m-p/7377#M7371</link>
      <description>&lt;P&gt;Try Repeat().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Two examples:&lt;/P&gt;
&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;seq = {"1-B", "1-B", "1-B", "1-D", "1-D", "1-D", "1-F", "1-F", "1-F", "1-H", "1-H", "1-H", "1-J", "1-J", "1-J",
"1-L", "1-L", "1-L", "2-B", "2-B", "2-B", "2-D", "2-D", "2-D", "2-F", "2-F", "2-F", "2-H", "2-H", "2-H", "2-J",
"2-J", "2-J", "2-L", "2-L", "2-L"};
// Repeat sequence a predefined number of times
New Table( "example 2", New Column( "Part", Character, Values( Repeat( seq, 5 ) ) ) );
// Repeat sequence to fit an existing table
dt = New Table( "example", &amp;lt;&amp;lt;add rows( 400 ) );
dt &amp;lt;&amp;lt; New Column( "Part",
  Character,
  Values(
  Repeat( seq, Floor( N Rows( dt ) / N Items( seq ) ) ) || seq[1 :: Mod( N Rows( dt ), N Items( seq ) )]
  )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 18:53:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-repeat-a-sequence-to-the-end-of-a-data-table/m-p/7377#M7371</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2017-09-18T18:53:50Z</dc:date>
    </item>
  </channel>
</rss>

