<?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 How to write a script to standardise attributes of columns from a generic data table? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-standardise-attributes-of-columns-from/m-p/561901#M77500</link>
    <description>&lt;P&gt;I am trying to write a script which standardises attributes from a generic data table. However, I getting the error "Argument must contain data table in access or evaluation on 'Current Data Table', Current Data Table*###*/(dt_trinean). Does anyone know hoe to fix this error?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="giulia_lambiase_0-1666977078601.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46703i88A1314F2E8D2C81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="giulia_lambiase_0-1666977078601.png" alt="giulia_lambiase_0-1666977078601.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="giulia_lambiase_1-1666977099033.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46704i269DABF5F164B449/image-size/medium?v=v2&amp;amp;px=400" role="button" title="giulia_lambiase_1-1666977099033.png" alt="giulia_lambiase_1-1666977099033.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:56:08 GMT</pubDate>
    <dc:creator>jlmbs</dc:creator>
    <dc:date>2023-06-10T23:56:08Z</dc:date>
    <item>
      <title>How to write a script to standardise attributes of columns from a generic data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-standardise-attributes-of-columns-from/m-p/561901#M77500</link>
      <description>&lt;P&gt;I am trying to write a script which standardises attributes from a generic data table. However, I getting the error "Argument must contain data table in access or evaluation on 'Current Data Table', Current Data Table*###*/(dt_trinean). Does anyone know hoe to fix this error?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="giulia_lambiase_0-1666977078601.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46703i88A1314F2E8D2C81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="giulia_lambiase_0-1666977078601.png" alt="giulia_lambiase_0-1666977078601.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="giulia_lambiase_1-1666977099033.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46704i269DABF5F164B449/image-size/medium?v=v2&amp;amp;px=400" role="button" title="giulia_lambiase_1-1666977099033.png" alt="giulia_lambiase_1-1666977099033.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:56:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-standardise-attributes-of-columns-from/m-p/561901#M77500</guid>
      <dc:creator>jlmbs</dc:creator>
      <dc:date>2023-06-10T23:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to standardise attributes of columns from a generic data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-standardise-attributes-of-columns-from/m-p/561926#M77501</link>
      <description>&lt;P&gt;the only variable you're giving to the local block is old dt.&amp;nbsp; Then you're using dt_trinean.&amp;nbsp; Instead of switching current datatables, it's often better to scope the data table expicitly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here( 1 );
dt = open("$SAMPLE_DATA\Big Class.jmp");
dt2 = New Table("Example", New Column("Thing", numeric, &amp;lt;&amp;lt;Set Values([1, 2, 3])));
print(current data table()); // DataTable("Example")
foreach({col, index}, 
	{dt:height, Column(dt, "weight"), // I'm telling it to use the dt table instead of dt2 (the current data table)
		dt2:thing // can even switch data tables in the middle no problem.  
	}, 
	col &amp;lt;&amp;lt; datatype(Character);
	// then you don't have to change data tables back either
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Oct 2022 17:31:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-standardise-attributes-of-columns-from/m-p/561926#M77501</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2022-10-28T17:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to standardise attributes of columns from a generic data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-standardise-attributes-of-columns-from/m-p/562158#M77521</link>
      <description>&lt;P&gt;Thanks, it worked by modifying the script as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Local( {dt_trinean_lst = Current Data Table()},
	Current Data Table( dt_trinean_lst );
	For Each( {col, index},
		{:"A280 Concentration(mg/ml)"n, :"AvgA280 Concentration (mg/ml)"n,
		:"CVA280 Concentration (%)"n},
		col &amp;lt;&amp;lt; Data Type( Numeric ) &amp;lt;&amp;lt; Set Modeling Type( "Continuous" ) &amp;lt;&amp;lt;
		Set Field Width( 12 )
	);
	Current Data Table( dt_trinean_lst );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now I want to get the summary of replicates on the concatenated table dt_trinean_lst. The code below throws this error, could you tell why and how to fix it?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="giulia_lambiase_0-1667056628855.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46728i3F49366067F86FD8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="giulia_lambiase_0-1667056628855.png" alt="giulia_lambiase_0-1667056628855.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_trinean_summary=dt_trinean_lst &amp;lt;&amp;lt; Summary(
	Group( :Sample name ),
	Mean( :"A280 Concentration(mg/ml)"n ),
	Mean( :"AvgA280 Concentration (mg/ml)"n ),
	Mean( :"CVA280 Concentration (%)"n ),
	Freq( "None" ),
	Weight( "None" ),
	Link to original data table( 0 )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 15:17:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-standardise-attributes-of-columns-from/m-p/562158#M77521</guid>
      <dc:creator>jlmbs</dc:creator>
      <dc:date>2022-10-29T15:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to standardise attributes of columns from a generic data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-standardise-attributes-of-columns-from/m-p/567505#M77844</link>
      <description>&lt;P&gt;because it's a local variable so once you leave the local block. that var doesn't exist anymore.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example.&amp;nbsp; This will fail after printing.&amp;nbsp; "inside local = 14"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
open log();
Local({x=14}, 
	print("inside local = "||char(x))
);
print("outside local = "||char(x));

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Nov 2022 21:08:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-standardise-attributes-of-columns-from/m-p/567505#M77844</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2022-11-09T21:08:29Z</dc:date>
    </item>
  </channel>
</rss>

