<?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: Adjusting Time Stamp For Ten Experimental Replicates in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Adjusting-Time-Stamp-For-Ten-Experimental-Replicates/m-p/400274#M65139</link>
    <description>&lt;P&gt;There could be easier was to do the formula depending on if the:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Data is sorted&lt;/LI&gt;&lt;LI&gt;If 35mph appears only once per repeat&lt;/LI&gt;&lt;LI&gt;If 35mph has always smallest Time value&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Because that information was not given or I did understand something incorrectly I went with a bit more complicated formula:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(12),
	Compress File When Saved(1),
	New Column("Repeat",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values([1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4])
	),
	New Column("Speed",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values([35, 35, 70, 35, 40, 70, 35, 36, 70, 60, 35, 36])
	),
	New Column("Time",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values([1, 2, 3, 1.1, 2, 3, 1.2, 2, 3, 1, 2, 3])
	)
);


dt &amp;lt;&amp;lt; New Column("Adjusted Time",
	Numeric,
	"Continuous",
	Formula(
		If(Row() == 1,
			//Find rows with speed of 35
			speedRows = Loc(:Speed &amp;lt;&amp;lt; get as matrix, 35);
			//get repeats for 35 rows
			repeats = :Repeat[SpeedRows];
		);
		//time for first 35mph for current rows repeat
		curTime = :Time[Loc(repeats, :Repeat)[1]]; //adjusted time	
		:Time - curTime;
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1626098395928.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/34105iF30782C4DE43E1C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1626098395928.png" alt="jthi_0-1626098395928.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jul 2021 14:04:28 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-07-12T14:04:28Z</dc:date>
    <item>
      <title>Adjusting Time Stamp For Ten Experimental Replicates</title>
      <link>https://community.jmp.com/t5/Discussions/Adjusting-Time-Stamp-For-Ten-Experimental-Replicates/m-p/400219#M65134</link>
      <description>&lt;P&gt;Our data has ten replicates (repeats, to be more accurate).&amp;nbsp; The desired data lies between vehicle speeds of 35 and 70 mph.&amp;nbsp; For each of the ten replicates, a column labeled "time" exists, and that time indication varies a little, due to experimental procedure variation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a calculated column, using JMP commands, not scripts, for "adjusted time."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this column, the value would be zeroed out by subtracting from each time value the first time indicated at the first speed of 35 mph.&amp;nbsp; For the ten replicates, that column would have to somehow inspect the replicate column, and on the first occasion of a new replicate, change the adjusted time for the 35 mph value time data of that replicate.&amp;nbsp; In this way, each "adjusted time" column would start at zero, and end at 70 mph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas how to automate this task?&amp;nbsp; Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:33:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adjusting-Time-Stamp-For-Ten-Experimental-Replicates/m-p/400219#M65134</guid>
      <dc:creator>Victor60</dc:creator>
      <dc:date>2023-06-10T23:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adjusting Time Stamp For Ten Experimental Replicates</title>
      <link>https://community.jmp.com/t5/Discussions/Adjusting-Time-Stamp-For-Ten-Experimental-Replicates/m-p/400274#M65139</link>
      <description>&lt;P&gt;There could be easier was to do the formula depending on if the:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Data is sorted&lt;/LI&gt;&lt;LI&gt;If 35mph appears only once per repeat&lt;/LI&gt;&lt;LI&gt;If 35mph has always smallest Time value&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Because that information was not given or I did understand something incorrectly I went with a bit more complicated formula:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(12),
	Compress File When Saved(1),
	New Column("Repeat",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values([1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4])
	),
	New Column("Speed",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values([35, 35, 70, 35, 40, 70, 35, 36, 70, 60, 35, 36])
	),
	New Column("Time",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values([1, 2, 3, 1.1, 2, 3, 1.2, 2, 3, 1, 2, 3])
	)
);


dt &amp;lt;&amp;lt; New Column("Adjusted Time",
	Numeric,
	"Continuous",
	Formula(
		If(Row() == 1,
			//Find rows with speed of 35
			speedRows = Loc(:Speed &amp;lt;&amp;lt; get as matrix, 35);
			//get repeats for 35 rows
			repeats = :Repeat[SpeedRows];
		);
		//time for first 35mph for current rows repeat
		curTime = :Time[Loc(repeats, :Repeat)[1]]; //adjusted time	
		:Time - curTime;
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1626098395928.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/34105iF30782C4DE43E1C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1626098395928.png" alt="jthi_0-1626098395928.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 14:04:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adjusting-Time-Stamp-For-Ten-Experimental-Replicates/m-p/400274#M65139</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-07-12T14:04:28Z</dc:date>
    </item>
  </channel>
</rss>

