<?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: In Split data table fucntion, how to input variable in &amp;quot;Remaining Columns&amp;quot; ? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/In-Split-data-table-fucntion-how-to-input-variable-in-quot/m-p/78679#M36502</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/70"&gt;@gzmorgan0&lt;/a&gt;! This is very helpful.&lt;/P&gt;&lt;P&gt;I am using JMP12 but I think I was reading old documentation, that is why I used ColID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although for the RemCol expression, Char() Function did not work. What worked was below expression:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;RemColExpr=Expr(Parse("Keep("||Concat Items(ColSellist,",")||")"))&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Oct 2018 02:02:40 GMT</pubDate>
    <dc:creator>shaira</dc:creator>
    <dc:date>2018-10-11T02:02:40Z</dc:date>
    <item>
      <title>In Split data table fucntion, how to input variable in "Remaining Columns" ?</title>
      <link>https://community.jmp.com/t5/Discussions/In-Split-data-table-fucntion-how-to-input-variable-in-quot/m-p/78510#M36434</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am making a script where the user inputs columns using a GUI and then the script splits the input table and make some correlation plots. The user input is very similar to the what the regular JMP Split function needs. My code for splitting looks something below, where remcol = "Drop all" or remcol="Keep all", depending on the user input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Splitdt = dt &amp;lt;&amp;lt; Split(
                      Split(Eval(parcollist)),  // the column to split
                      Group(Eval(grpcollist)),
                      ColID(Eval(splitcoln)),   
                      Remaining Columns(&lt;FONT color="#FF0000"&gt;Eval(RemCol)&lt;/FONT&gt;),
                      Output Table Name((dt&amp;lt;&amp;lt;Get Name)||" Split")            
                     );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The script above does not work, but this works.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Splitdt = dt &amp;lt;&amp;lt; Split(
                      Split(Eval(parcollist)),  // the column to split
                      Group(Eval(grpcollist)),
                      ColID(Eval(splitcoln)),   
                      Remaining Columns(&lt;FONT color="#FF0000"&gt;"Drop all"&lt;/FONT&gt;),
                      Output Table Name((dt&amp;lt;&amp;lt;Get Name)||" Split")            
                     );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now my question is, how to I input the user preference for Remaining Columns as a variable? If I input the variable, it does not work, but typing would work. Unfortunately, this would take away the script flexibility, that is why I prefer using variable as input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shaira&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 00:44:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-Split-data-table-fucntion-how-to-input-variable-in-quot/m-p/78510#M36434</guid>
      <dc:creator>shaira</dc:creator>
      <dc:date>2018-10-10T00:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: In Split data table fucntion, how to input variable in "Remaining Columns" ?</title>
      <link>https://community.jmp.com/t5/Discussions/In-Split-data-table-fucntion-how-to-input-variable-in-quot/m-p/78535#M36442</link>
      <description>&lt;P&gt;Which Version of JMP are you using?&amp;nbsp; I know that JMP 9 and later use Split By()&amp;nbsp; versus Col ID()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have a much older version of JMP,&amp;nbsp; I am not sure this will work.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval( EvalExpr( Splitdt = dt &amp;lt;&amp;lt; Split(
                      Split(Expr(parcollist)),  // the column to split
                      Group(Expr(grpcollist)),
                      ColID(Expr(splitcoln)),   
                      Remaining Columns(Expr(RemCol)),
                      Output Table Name((dt&amp;lt;&amp;lt;Get Name)||" Split")            
                     )
        )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You cal keep the Eval() around the "list" variables, however, I used Expr() to make the syntax consistent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: if you decide to allow users to select columns to keep, I'll assume there would be a list of names or column references called keepColList. Then you can use something like this to define the remaining columns with the script above.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;remcol = Expr(Parse("Keep(" ||char(keepColList) || ")"));

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 08:11:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-Split-data-table-fucntion-how-to-input-variable-in-quot/m-p/78535#M36442</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-10-10T08:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: In Split data table fucntion, how to input variable in "Remaining Columns" ?</title>
      <link>https://community.jmp.com/t5/Discussions/In-Split-data-table-fucntion-how-to-input-variable-in-quot/m-p/78679#M36502</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/70"&gt;@gzmorgan0&lt;/a&gt;! This is very helpful.&lt;/P&gt;&lt;P&gt;I am using JMP12 but I think I was reading old documentation, that is why I used ColID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although for the RemCol expression, Char() Function did not work. What worked was below expression:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;RemColExpr=Expr(Parse("Keep("||Concat Items(ColSellist,",")||")"))&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Oct 2018 02:02:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-Split-data-table-fucntion-how-to-input-variable-in-quot/m-p/78679#M36502</guid>
      <dc:creator>shaira</dc:creator>
      <dc:date>2018-10-11T02:02:40Z</dc:date>
    </item>
  </channel>
</rss>

