<?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: create &amp;amp; transpose column data based on intervals in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/434328#M68410</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;: i did a really poor job at explaining. so this is just a snippet. it's arbitrary as far as the range.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context, i'm discharging material to a drum from a tank. When drum gets close to full, i'll shut down the system (so drum mass changes marginally during this time), but this is arbitrary--it's not shut down every single time at the same drum mass.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so basically, i need to loop through the dataset. to get how many drums we go through, what are the starting mass values, ending mass values, and what is the duration.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Nov 2021 22:33:43 GMT</pubDate>
    <dc:creator>haleyhoewt</dc:creator>
    <dc:date>2021-11-08T22:33:43Z</dc:date>
    <item>
      <title>create &amp; transpose column data based on intervals</title>
      <link>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/433076#M68270</link>
      <description>&lt;P&gt;Hi Data Experts!&lt;/P&gt;&lt;P&gt;I have a set of data I'm looking to better organize.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem Statement: would like a intervaled report-out of the mass rate of change with respect to time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Time&lt;/TD&gt;&lt;TD&gt;Mass (kg)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;62&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;64&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;79&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;73&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;74&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;92&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While i'm open to alternative solves to satisfy the above problem statement, currently what I'm finding as likely the best path forward (but having difficulty understanding how to implement) is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Transpose data in subsets of 10s to get this:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Time Intervals&lt;/TD&gt;&lt;TD&gt;1-10&lt;/TD&gt;&lt;TD&gt;11-21&lt;/TD&gt;&lt;TD&gt;22-32&lt;/TD&gt;&lt;TD&gt;33-43&lt;/TD&gt;&lt;TD&gt;44-54&lt;/TD&gt;&lt;TD&gt;etc...&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;dM/dt&lt;/TD&gt;&lt;TD&gt;=(60-20)/10&lt;/TD&gt;&lt;TD&gt;=(62-73)/10&lt;/TD&gt;&lt;TD&gt;ect..&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;wondering if someone can offer insight on how i would do this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;-Haley&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:39:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/433076#M68270</guid>
      <dc:creator>haleyhoewt</dc:creator>
      <dc:date>2023-06-10T23:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: create &amp; transpose column data based on intervals</title>
      <link>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/433114#M68275</link>
      <description>&lt;P&gt;The intervals are changing, is it on purpose? First is 10 values but the rest are 11 values.&lt;/P&gt;&lt;P&gt;I would add two formula columns:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;First to calculate category&lt;/LI&gt;&lt;LI&gt;Second to calculate dM/dt&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Then I would create Summary table and report that.&lt;/P&gt;&lt;P&gt;Start table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1636042878095.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37281i6F5CF0D492B8878C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1636042878095.png" alt="jthi_1-1636042878095.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;End result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1636042867871.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37280i93919333A9EA1ECC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1636042867871.png" alt="jthi_0-1636042867871.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is example script with two calculations for categories and ending up with summary table, this all can also be done interactively from JMP:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Names Default To Here(1);
dt = New Table("Untitled",
	Add Rows(33),
	New Column("Time",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values(
			[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
			32, 33]
		)
	),
	New Column("Mass",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values(
			[78, 89, 72, 72, 74, 81, 70, 74, 84, 89, 52, 81, 52, 60, 64, 83, 53, 60, 70, 64, 70, 55, 82, 74, 69, 83, 56, 71, 54,
			50, 53, 67, 88]
		)
	)
);

dt &amp;lt;&amp;lt; New Column("Category", Numeric, Ordinal,
	Formula(Floor((:Time -1) / 10)+1)
);

dt &amp;lt;&amp;lt; New Column("Category2", Character, Numeric,
	Formula(
		Char(Floor((:Time - 1) / 10)*10 + 1) || "-" || Char((Floor((:Time - 1)/ 10)+1) * 10)
	)
);

dt &amp;lt;&amp;lt; New Column("dmdt", Numeric, Continuous,
	Formula((Col Max(:Mass, :Category) - Col Min(:Mass, :Category)) / 10)
);

dt_sum = dt &amp;lt;&amp;lt; Summary(
	Group(:Category),
	Mean(:dmdt),
	Freq("None"),
	Weight("None"),
	statistics column name format("column"),
	Link to original data table(0)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 16:33:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/433114#M68275</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-11-04T16:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: create &amp; transpose column data based on intervals</title>
      <link>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/433192#M68289</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/28907"&gt;@haleyhoewt&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;in the following table you have a script that will produce the table summary.&lt;/P&gt;
&lt;P&gt;you can change the size of the ranges by modifying one number in the sequence column as in the picture,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ron_horne_0-1636049819012.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37290i54916FBE7B00A061/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ron_horne_0-1636049819012.png" alt="ron_horne_0-1636049819012.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;let us know if it helps&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 18:20:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/433192#M68289</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2021-11-04T18:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: create &amp; transpose column data based on intervals</title>
      <link>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/434328#M68410</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;: i did a really poor job at explaining. so this is just a snippet. it's arbitrary as far as the range.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context, i'm discharging material to a drum from a tank. When drum gets close to full, i'll shut down the system (so drum mass changes marginally during this time), but this is arbitrary--it's not shut down every single time at the same drum mass.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so basically, i need to loop through the dataset. to get how many drums we go through, what are the starting mass values, ending mass values, and what is the duration.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 22:33:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/434328#M68410</guid>
      <dc:creator>haleyhoewt</dc:creator>
      <dc:date>2021-11-08T22:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: create &amp; transpose column data based on intervals</title>
      <link>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/434340#M68411</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt; mentions, a good way to do this is with the Summary platform, provided you capture the data with some "Group" variable that changes whenever the process is stopped. Here, I've used "Cycle" for this purpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, suppose we have this data:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brady_brady_1-1636415278857.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37420i838B0DBF9957FA29/image-size/large?v=v2&amp;amp;px=999" role="button" title="brady_brady_1-1636415278857.png" alt="brady_brady_1-1636415278857.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can use the Summary platform, filling out the dialog like so:&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="brady_brady_0-1636414996413.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37419iDAD292A50C41E67C/image-size/large?v=v2&amp;amp;px=999" role="button" title="brady_brady_0-1636414996413.png" alt="brady_brady_0-1636414996413.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which produces:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brady_brady_2-1636415338924.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37421i53A0AC07798EE72A/image-size/large?v=v2&amp;amp;px=999" role="button" title="brady_brady_2-1636415338924.png" alt="brady_brady_2-1636415338924.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, in this new Summary table, create a new column, dMdt, with a formula (the 3600 factor is to convert the base time unit of seconds to hours):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brady_brady_3-1636415388373.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37422i16E94945A0CFEA98/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brady_brady_3-1636415388373.png" alt="brady_brady_3-1636415388373.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now we have:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brady_brady_4-1636415429087.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37423i0AA1FB047D49B6C1/image-size/large?v=v2&amp;amp;px=999" role="button" title="brady_brady_4-1636415429087.png" alt="brady_brady_4-1636415429087.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've attached the first dataset so you can try this out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Brady&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 23:53:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/create-amp-transpose-column-data-based-on-intervals/m-p/434340#M68411</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2021-11-08T23:53:47Z</dc:date>
    </item>
  </channel>
</rss>

