<?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 Manipulation - How do I remove Initial Offsets specific to a col identifier in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Data-Manipulation-How-do-I-remove-Initial-Offsets-specific-to-a/m-p/193777#M41442</link>
    <description>&lt;P&gt;Wow - thanks John! this saves an immense amount of time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not familiar with the functions you have used so I'm going to study them and figure out how to scale this across all the cols!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
    <pubDate>Fri, 19 Apr 2019 18:37:56 GMT</pubDate>
    <dc:creator>Mark_Don</dc:creator>
    <dc:date>2019-04-19T18:37:56Z</dc:date>
    <item>
      <title>Data Manipulation - How do I remove Initial Offsets specific to a col identifier</title>
      <link>https://community.jmp.com/t5/Discussions/Data-Manipulation-How-do-I-remove-Initial-Offsets-specific-to-a/m-p/193756#M41438</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My first post!&amp;nbsp;I have a regular set of data I process and have been doing manual manipulation in excel before importing and plotting in JMP. I'm sure someone has a better way :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;I measure 16 DUT's and record offset data for each dut.&amp;nbsp;I would like to zero out each individual DUT offset based on the first 100samples of data and apply this to all rows of data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to remove the initial offset based of "X_" on average of say the first 100 rows. This offset is unique to each DUT identified in COl "DUT#".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a slick way of doing this via formula or built in scripting options?&lt;/P&gt;&lt;P&gt;My manual method is to split table by DUT, create 16 new cols, subtract an average of the first 100 data and then restack it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached the plot and .jmp table showing raw data plotted without the intiial offset being removed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Plot.PNG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16933i0ED4433AAACC3F01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Plot.PNG" alt="Plot.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Ultimately I want to see the relative change over time hence removal of the intiial offset!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One other challenge is in dealing with the Date / Time cols. Note I plotted Time / Date, ideally I would like to calculate the time in hours starting from zero to the end of dataset and plot from zero to say 85hours on the X Axis of this plot. I'm struggling to manipulate this using the formula!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated to make my day more productive!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2019 14:51:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-Manipulation-How-do-I-remove-Initial-Offsets-specific-to-a/m-p/193756#M41438</guid>
      <dc:creator>Mark_Don</dc:creator>
      <dc:date>2019-04-19T14:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation - How do I remove Initial Offsets specific to a col identifier</title>
      <link>https://community.jmp.com/t5/Discussions/Data-Manipulation-How-do-I-remove-Initial-Offsets-specific-to-a/m-p/193775#M41440</link>
      <description>&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a short script that should take care of the offsets.&amp;nbsp; Attached is a version of you file that shows the column formulas.&amp;nbsp; Note that I also created a "Date Time" column.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dtStart = dt &amp;lt;&amp;lt; subset( rows( 1 :: 160 ), all columns( 1 ) );
Summarize( dtStart, DUT = by( :name( "DUT#" ) ), startMeans = Mean( :X_ ) );
offsets = Associative Array( DUT, startMeans );
Close( dtStart, nosave );
For( i = 1, i &amp;lt;= N Rows( dt ), i++,
	Column( dt, "X_NORM" )[i] = Column( dt, "X_" )[i] - offsets[Char( Column( dt, "DUT#" )[i] )]
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2019 17:51:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-Manipulation-How-do-I-remove-Initial-Offsets-specific-to-a/m-p/193775#M41440</guid>
      <dc:creator>johnmoore</dc:creator>
      <dc:date>2019-04-19T17:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation - How do I remove Initial Offsets specific to a col identifier</title>
      <link>https://community.jmp.com/t5/Discussions/Data-Manipulation-How-do-I-remove-Initial-Offsets-specific-to-a/m-p/193777#M41442</link>
      <description>&lt;P&gt;Wow - thanks John! this saves an immense amount of time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not familiar with the functions you have used so I'm going to study them and figure out how to scale this across all the cols!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2019 18:37:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-Manipulation-How-do-I-remove-Initial-Offsets-specific-to-a/m-p/193777#M41442</guid>
      <dc:creator>Mark_Don</dc:creator>
      <dc:date>2019-04-19T18:37:56Z</dc:date>
    </item>
  </channel>
</rss>

