<?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: Custom function with varying number of input columns? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820653#M99936</link>
    <description>&lt;P&gt;I suffer from the missing concatenate entry in the right click / new formula column menu.&lt;BR /&gt;I want to create my own function.&amp;nbsp;&lt;BR /&gt;I guess the custom function can just be used for transforms if the columns are listed individually.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Dec 2024 15:55:33 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-12-04T15:55:33Z</dc:date>
    <item>
      <title>Custom function with varying number of input columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820580#M99927</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to define a custom function which works for 2-5 selected columns?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Add Custom Functions(
	New Custom Function(
		"custom",
		"concat",
		Function( {col1, col2, col3=., col4=., col5=.},
			If(not (is missing(col 4)),
			Char(col1) || "_" || Char(col2)|| "_" || Char(col3)|| "_" || Char(col4)|| "_" || Char(col5),
			not (is missing(col 4)),
			Char(col1) || "_" || Char(col2)|| "_" || Char(col3)|| "_" || Char(col4),
			not (is missing(col 3)),
			Char(col1) || "_" || Char(col2)|| "_" || Char(col3),
			not (is missing(col 4)),
			Char(col1) || "_" || Char(col2))
		),
		&amp;lt;&amp;lt;Transform Category( 1 ),
		&amp;lt;&amp;lt;Description( "combine 2-5 columns with underscore" ),
		&amp;lt;&amp;lt;Example(
			Expr(
				Show( custom:concat( :height, :weight, :sex, :age, :name ) );
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Dec 2024 12:56:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820580#M99927</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-04T12:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Custom function with varying number of input columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820615#M99932</link>
      <description>&lt;P&gt;How about passing the columns in as a list?&amp;nbsp; That way there's only one argument, and it can have as many columns as you want.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 13:41:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820615#M99932</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2024-12-04T13:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom function with varying number of input columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820653#M99936</link>
      <description>&lt;P&gt;I suffer from the missing concatenate entry in the right click / new formula column menu.&lt;BR /&gt;I want to create my own function.&amp;nbsp;&lt;BR /&gt;I guess the custom function can just be used for transforms if the columns are listed individually.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 15:55:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820653#M99936</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-04T15:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Custom function with varying number of input columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820658#M99937</link>
      <description>&lt;P&gt;Concatenate is there in JMP 18. &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-12-04_11-05-55.109.png" style="width: 572px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/70844i0BAAC3406685E9A6/image-dimensions/572x449?v=v2" width="572" height="449" role="button" title="2024-12-04_11-05-55.109.png" alt="2024-12-04_11-05-55.109.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 16:06:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820658#M99937</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2024-12-04T16:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Custom function with varying number of input columns?</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820660#M99939</link>
      <description>&lt;P&gt;Unfortunately, NOT in general.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, there is such a function.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; New Formula Column(
	Operation( Category( "Character" ), "Concatenate with Underscore" ),
	Columns( :height, :weight )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;It appears in the right-click new formula column menu&amp;nbsp;if at least one of the columns is a character column.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the setting disappears if all columns are numeric&amp;nbsp; : (&lt;BR /&gt;&lt;BR /&gt;Until now, we used a special shortcut icon in a toolbar.&lt;BR /&gt;A few days ago, one of my colleagues asked why there is no such possibility via the right-click new formula column.&lt;BR /&gt;So close - but for many cases: not accessible via the GUI.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 21:40:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-function-with-varying-number-of-input-columns/m-p/820660#M99939</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-04T21:40:23Z</dc:date>
    </item>
  </channel>
</rss>

