<?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: Data subset indexing tips in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Data-subset-indexing-tips/m-p/281454#M54507</link>
    <description>&lt;P&gt;You can use a new column, index, with a formula for the group variable. The formula will look like this, assuming that the times are sequential:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( :time &amp;gt; Lag( :time ), Lag( :index ), Lag( :index ) + 1 )&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 23 Jul 2020 17:12:49 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2020-07-23T17:12:49Z</dc:date>
    <item>
      <title>Data subset indexing tips</title>
      <link>https://community.jmp.com/t5/Discussions/Data-subset-indexing-tips/m-p/281444#M54506</link>
      <description>&lt;P&gt;I have a bunch of concatenated test runs output that have columns: &amp;nbsp;time, position, speed, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... and time goes from 0 to some number, e.g. 50, then resets to zero and starts up again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to make a new column, setid, that indexes the sets, so the first set (time 0-50) gets a "1" in the setid column, the second set (time resets to 0...) gets a "2" in the setid column, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a smart/easy way to do this without resorting to .jsl scripting? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought about doing "New formula column" -&amp;gt; Row -&amp;gt; Diff on the time column, and the negative times would indicate start of a new set, but then I'm back to writing a custom lag formula.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:16:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-subset-indexing-tips/m-p/281444#M54506</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2023-06-10T23:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Data subset indexing tips</title>
      <link>https://community.jmp.com/t5/Discussions/Data-subset-indexing-tips/m-p/281454#M54507</link>
      <description>&lt;P&gt;You can use a new column, index, with a formula for the group variable. The formula will look like this, assuming that the times are sequential:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( :time &amp;gt; Lag( :time ), Lag( :index ), Lag( :index ) + 1 )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jul 2020 17:12:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-subset-indexing-tips/m-p/281454#M54507</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-07-23T17:12:49Z</dc:date>
    </item>
  </channel>
</rss>

