<?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 Stacking timestamps? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340665#M58907</link>
    <description>&lt;P&gt;I have a data table that has time increments from 0--&amp;gt;n for each step for a series of several steps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wondering if there's a bkm to script to make each step time start at the end time of the previous step.&lt;/P&gt;&lt;P&gt;aka:&lt;/P&gt;&lt;P&gt;currently: step1, time = 0--&amp;gt; 7, step2, time = 0--&amp;gt;12&lt;/P&gt;&lt;P&gt;goal: step1, time=0--&amp;gt;7, step2, time7--&amp;gt;19&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Columns:&amp;nbsp;&lt;/P&gt;&lt;P&gt;sensor Label | Value | time | Step&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 22:00:13 GMT</pubDate>
    <dc:creator>aliegner1</dc:creator>
    <dc:date>2023-06-09T22:00:13Z</dc:date>
    <item>
      <title>Stacking timestamps?</title>
      <link>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340665#M58907</link>
      <description>&lt;P&gt;I have a data table that has time increments from 0--&amp;gt;n for each step for a series of several steps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wondering if there's a bkm to script to make each step time start at the end time of the previous step.&lt;/P&gt;&lt;P&gt;aka:&lt;/P&gt;&lt;P&gt;currently: step1, time = 0--&amp;gt; 7, step2, time = 0--&amp;gt;12&lt;/P&gt;&lt;P&gt;goal: step1, time=0--&amp;gt;7, step2, time7--&amp;gt;19&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Columns:&amp;nbsp;&lt;/P&gt;&lt;P&gt;sensor Label | Value | time | Step&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:00:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340665#M58907</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2023-06-09T22:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking timestamps?</title>
      <link>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340689#M58908</link>
      <description>&lt;P&gt;Here is a sample data table and a simple script that will adjust the time when the step changes.&amp;nbsp; The script first displays the data table for 10 seconds, so you can see what the original table looks like, and then it goes ahead and runs the little script to adjust the time values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "example",
	Add Rows( 42 ),
	New Column( "time",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 1,
			2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
		)
	),
	New Column( "Step",
		Character,
		"Nominal",
		Set Values(
			{"Step1", "Step1", "Step1", "Step1", "Step1", "Step1", "Step1", "Step1",
			"Step2", "Step2", "Step2", "Step2", "Step2", "Step2", "Step2", "Step2",
			"Step2", "Step2", "Step2", "Step2", "Step2", "Step3", "Step3", "Step3",
			"Step3", "Step3", "Step3", "Step3", "Step3", "Step3", "Step3", "Step3",
			"Step3", "Step3", "Step3", "Step3", "Step3", "Step3", "Step3", "Step3",
			"Step3", "Step3"}
		)
	)
);

wait(10);

For Each Row(
	If( Row() == 1,
		adder = 0,
		If( Lag( :step ) != :step,
			adder = :time[Row() - 1]
		)
	);
	:time = :time + adder;
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Dec 2020 01:57:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340689#M58908</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-12-10T01:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking timestamps?</title>
      <link>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340893#M58927</link>
      <description>&lt;P&gt;this works great! I am noticing just a small issue. at the time increment where the step changes, it is repeating the time value, rather than incrementing. I'm still trying to understand the LAG function. Any tips?&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="aliegner1_1-1607631260606.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28844i20A3B53548C93A57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aliegner1_1-1607631260606.png" alt="aliegner1_1-1607631260606.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, any tips for adding in x-axis markers into the script to label the blocks of the trace?&lt;/P&gt;&lt;P&gt;I can create new columns for local min/max based on step#, but not sure how to script that into an axis label.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aliegner1_2-1607631432803.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28845iFBE4FA4BFA536A00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aliegner1_2-1607631432803.png" alt="aliegner1_2-1607631432803.png" /&gt;&lt;/span&gt;&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="aliegner1_0-1607631184743.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28843i87B761F9163BFD84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aliegner1_0-1607631184743.png" alt="aliegner1_0-1607631184743.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 20:17:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340893#M58927</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2020-12-10T20:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking timestamps?</title>
      <link>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340894#M58928</link>
      <description>&lt;P&gt;Concerning your first issue, your requirement for the increment between steps was&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;goal: step1, time=0--&amp;gt;7, step2, time7--&amp;gt;19&lt;/P&gt;
&lt;P&gt;Note, the time value was the same for the last value in the first step, as well as the first time in the second step.&lt;/P&gt;
&lt;P&gt;If you want to increment between the steps, just change the adder value to whatever the additional increment is desired&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;adder = :time[Row() - 1] + 1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I do not understand what you are asking for when you say "&lt;SPAN&gt;adding in x-axis markers into the script to label the blocks of the trace&lt;/SPAN&gt;".&lt;/P&gt;
&lt;P&gt;Finally, All of the functions, such as Lag() are documented in the Scripting Index, available under the Help pull down menu.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 20:45:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340894#M58928</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-12-10T20:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking timestamps?</title>
      <link>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340916#M58931</link>
      <description>&lt;P&gt;sorry for the miscommunication.&lt;BR /&gt;I was trying to mean:&lt;BR /&gt;I'm trying to script in axis labels on the x-axis corresponding to the step time max or mins. I'm trying to figure out the summarize script or assigning a variables = colMax (time by step) but having trouble getting the syntax to work.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 23:54:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340916#M58931</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2020-12-10T23:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking timestamps?</title>
      <link>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340980#M58937</link>
      <description>Take a look at adding reference lines on the x axis to mark the points on the X axis for the steps min and max</description>
      <pubDate>Fri, 11 Dec 2020 03:40:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/340980#M58937</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-12-11T03:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking timestamps?</title>
      <link>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/341233#M58965</link>
      <description>Thank you.&lt;BR /&gt;I created a summary table, then assigned variables to specific ("column")[row#] locations then assigned reference lines equal to those variable names.</description>
      <pubDate>Fri, 11 Dec 2020 23:02:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/341233#M58965</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2020-12-11T23:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Stacking timestamps?</title>
      <link>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/598297#M80202</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 05:27:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stacking-timestamps/m-p/598297#M80202</guid>
      <dc:creator>UersK</dc:creator>
      <dc:date>2023-02-08T05:27:51Z</dc:date>
    </item>
  </channel>
</rss>

