<?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 Help to concatenate 3 columns with labels rather than values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/635616#M83377</link>
    <description>&lt;P&gt;Hello, I wanted to check if anyone has a solution for concatenating 3 columns with the labels of those columns rather than the values?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ritesh&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jun 2023 00:01:34 GMT</pubDate>
    <dc:creator>riteshj</dc:creator>
    <dc:date>2023-06-11T00:01:34Z</dc:date>
    <item>
      <title>Help to concatenate 3 columns with labels rather than values</title>
      <link>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/635616#M83377</link>
      <description>&lt;P&gt;Hello, I wanted to check if anyone has a solution for concatenating 3 columns with the labels of those columns rather than the values?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ritesh&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 00:01:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/635616#M83377</guid>
      <dc:creator>riteshj</dc:creator>
      <dc:date>2023-06-11T00:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help to concatenate 3 columns with labels rather than values</title>
      <link>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/635639#M83378</link>
      <description>&lt;P&gt;Do you want the final column to have values or labels (or both)? One option I think could be to create associative array of each of those columns and then use the column value as key to get correct value and concatenate those.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 16:44:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/635639#M83378</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-05-25T16:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help to concatenate 3 columns with labels rather than values</title>
      <link>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/639764#M83731</link>
      <description>&lt;P&gt;Do you want to create a new column with the name being the other 3 column names concantenated to each other? Like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Table( "Untitled 3",
	Add Rows( 0 ),
	Compress File When Saved( 1 ),
	New Column( "a", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [] ) ),
	New Column( "b", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [] ) ),
	New Column( "c", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [] ) )
);
NewColumnName = (Column(1)&amp;lt;&amp;lt;get name) || "-" || (Column(2)&amp;lt;&amp;lt;get name) || "-" || (Column(3)&amp;lt;&amp;lt;get name);
New Column( NewColumnName, Numeric, "Continuous", Format( "Best", 12 ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jun 2023 08:25:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/639764#M83731</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2023-06-07T08:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help to concatenate 3 columns with labels rather than values</title>
      <link>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/640049#M83751</link>
      <description>&lt;P&gt;following&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;'s idea, it could be something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

:age &amp;lt;&amp;lt; Value Labels( {12 = "very young",13 = "young",14= "mid", 15 = "elder", 16 = "old",17 = "eldest"} );

Mylabels= arg(:age &amp;lt;&amp;lt; get value labels,1);
splitList=Transform Each({pair},MyLabels,EvalList({Arg(pair,1),Arg(pair,2)}));
ageLabels=Associative Array(splitList);

New column("new",Character, Set Each Value(:sex ||"_"|| ageLabels[:age]))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 18:12:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/640049#M83751</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-07T18:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help to concatenate 3 columns with labels rather than values</title>
      <link>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/640062#M83753</link>
      <description>&lt;P&gt;Alternatively, you could use &lt;STRONG&gt;Recode&lt;/STRONG&gt; to get a column with the &lt;STRONG&gt;value labels&lt;/STRONG&gt; - and then use this column.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1686160309399.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/53504iBB22425B5FD7CB86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1686160309399.png" alt="hogi_0-1686160309399.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but I fear, Recode doesn't have an option&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Recode Column(columnname, &lt;STRONG&gt;Replace values with value labels&lt;/STRONG&gt;, ...)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;so, if you want to automate the process, you have to retrieve the label replacement rule like in the example above and paste it into the &lt;STRONG&gt;Recode Column&lt;/STRONG&gt; expression:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	dt &amp;lt;&amp;lt; Recode Column(
		dt:age,
		Map Value(
			_rcOrig,
			{12, "very young", 13, "young", 14, "mid", 15, "elder", 16, "old", 17,"eldest"},
			Unmatched( _rcNow )
	...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 18:08:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-to-concatenate-3-columns-with-labels-rather-than-values/m-p/640062#M83753</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-07T18:08:20Z</dc:date>
    </item>
  </channel>
</rss>

