<?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 make expressions work in statements？ in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/637564#M83533</link>
    <description>&lt;P&gt;If you are still having the problem, I'll be happy to look at it.&amp;nbsp; Can you post the data table you are using?&lt;/P&gt;</description>
    <pubDate>Wed, 31 May 2023 21:11:23 GMT</pubDate>
    <dc:creator>Jasean</dc:creator>
    <dc:date>2023-05-31T21:11:23Z</dc:date>
    <item>
      <title>How to make expressions work in statements？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/625701#M82450</link>
      <description>&lt;P&gt;I used the loop to generate an expression factors() with the contents of the parentheses. But it doesn't work in DOE's data simulation statement.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fs = Expr(Factors(L1 &amp;lt;&amp;lt; random(normal(0, 0.5)), L12 &amp;lt;&amp;lt; random(normal(0, 0.5))) );
eval(evalexpr(dt &amp;lt;&amp;lt; Profiler(
			Y( :Y ),
			Profiler(
				1,
				Simulator(
					1,
					Expr(fs), 
					
					Responses( Y &amp;lt;&amp;lt; No Noise ),
					N Runs( 1000000 ),
					Resimulate
				)
			)
		)));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:08:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/625701#M82450</guid>
      <dc:creator>lehaofeng</dc:creator>
      <dc:date>2023-06-09T16:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to make expressions work in statements？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/625895#M82455</link>
      <description>&lt;P&gt;In your profiler statement, you are telling JMP to evaluate the variable fs and place whatever is returned into the enclosing profiler launch expression.&amp;nbsp; In this case, you need the evaluation of fs to return the expression.&amp;nbsp; To see what fs returns when you evaluate it, you can highlight the variable and click the run button.&amp;nbsp; When you do this, JMP will error because it is trying to evaluate the expression.&amp;nbsp; That expression is not a valid JSL statement by itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In short, you do not want to evaluate the expression held by fs, you want to get the expression itself.&amp;nbsp; To do this, use the NameExpr() function.&amp;nbsp; Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fs = Expr( Factors( L1 &amp;lt;&amp;lt; random( normal( 0, 0.5 ) ), L12 &amp;lt;&amp;lt; random( normal( 0, 0.5 ) ) ) );

Eval(
	Eval Expr(
		dt &amp;lt;&amp;lt; Profiler(
			Y( :Y ),
			Profiler(
				1,
				Simulator(
					1,
					Expr( Name Expr( fs ) ), 
					
					Responses( Y &amp;lt;&amp;lt; No Noise ),
					N Runs( 1000000 ),
					Resimulate
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Apr 2023 13:58:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/625895#M82455</guid>
      <dc:creator>Jasean</dc:creator>
      <dc:date>2023-04-25T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to make expressions work in statements？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/625907#M82458</link>
      <description>&lt;P&gt;谢谢你的快速回答，many thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 14:21:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/625907#M82458</guid>
      <dc:creator>lehaofeng</dc:creator>
      <dc:date>2023-04-25T14:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to make expressions work in statements？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/626133#M82489</link>
      <description>&lt;P&gt;I don't know why, but none of the code after Expr( Name Expr( fs ) ) works. Can you help me look at it? For example, N Runs( 1000000 )&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 03:21:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/626133#M82489</guid>
      <dc:creator>lehaofeng</dc:creator>
      <dc:date>2023-04-26T03:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to make expressions work in statements？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/637564#M83533</link>
      <description>&lt;P&gt;If you are still having the problem, I'll be happy to look at it.&amp;nbsp; Can you post the data table you are using?&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 21:11:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-expressions-work-in-statements/m-p/637564#M83533</guid>
      <dc:creator>Jasean</dc:creator>
      <dc:date>2023-05-31T21:11:23Z</dc:date>
    </item>
  </channel>
</rss>

