<?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: How to store variable values in a list properly? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-store-variable-values-in-a-list-properly/m-p/717337#M89906</link>
    <description>&lt;P&gt;Use Eval List() to evaluate the list (&lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/evaluate-lists.shtml#" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; Data Structures &amp;gt; Lists in JSL Scripts &amp;gt; Evaluate Lists&lt;/A&gt; )&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("my table", New Column("X", set values({-0.35, 0.15, 0.3})));
dt &amp;lt;&amp;lt; New Column("Y", set values({300, 250, 200}));
xmean = Col Mean(:X);
ymax = Col Max(:Y);
ymin = Col Min(:Y);
Print(xmean, ymax, ymin);

dtsum = Eval List({xmean, ymax, ymin});

Print(dtsum);
If(dtsum[1] &amp;lt; 0,
	Print(dtsum[2]),
	Print(dtsum[3])
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Jan 2024 15:41:10 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-01-16T15:41:10Z</dc:date>
    <item>
      <title>How to store variable values in a list properly?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-store-variable-values-in-a-list-properly/m-p/717324#M89904</link>
      <description>&lt;P&gt;The first 6 lines of the script below work as I expected, with output copied below.&lt;/P&gt;&lt;P&gt;Then I tried to store the values of these variables in a list, which didn't go well. It appears that the variable names instead of the values were stored. How do I store the variable values in the list? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = new table("my table", new column("X", set values({-0.35, 0.15, 0.3}) ) );
dt &amp;lt;&amp;lt; new column("Y", set values({300, 250, 200}) );
xmean = col mean (:X);
ymax = col max(:Y);
ymin = col min(:Y);
print (xmean, ymax, ymin);

dtsum = {xmean, ymax, ymin};
print (dtsum);
if (dtsum[1] &amp;lt; 0, print (dtsum[2]), print(dtsum[3]));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outputs:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;0.0333333333333333
300
200
{xmean, ymax, ymin}
.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 15:29:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-store-variable-values-in-a-list-properly/m-p/717324#M89904</guid>
      <dc:creator>CurseOfLizard13</dc:creator>
      <dc:date>2024-01-16T15:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to store variable values in a list properly?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-store-variable-values-in-a-list-properly/m-p/717337#M89906</link>
      <description>&lt;P&gt;Use Eval List() to evaluate the list (&lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/evaluate-lists.shtml#" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; Data Structures &amp;gt; Lists in JSL Scripts &amp;gt; Evaluate Lists&lt;/A&gt; )&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("my table", New Column("X", set values({-0.35, 0.15, 0.3})));
dt &amp;lt;&amp;lt; New Column("Y", set values({300, 250, 200}));
xmean = Col Mean(:X);
ymax = Col Max(:Y);
ymin = Col Min(:Y);
Print(xmean, ymax, ymin);

dtsum = Eval List({xmean, ymax, ymin});

Print(dtsum);
If(dtsum[1] &amp;lt; 0,
	Print(dtsum[2]),
	Print(dtsum[3])
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jan 2024 15:41:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-store-variable-values-in-a-list-properly/m-p/717337#M89906</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-16T15:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to store variable values in a list properly?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-store-variable-values-in-a-list-properly/m-p/717348#M89908</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 15:49:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-store-variable-values-in-a-list-properly/m-p/717348#M89908</guid>
      <dc:creator>CurseOfLizard13</dc:creator>
      <dc:date>2024-01-16T15:49:39Z</dc:date>
    </item>
  </channel>
</rss>

