<?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 convert column value labels to values? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10863#M10477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change Data Type to character and then use Recode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Feb 2015 11:30:53 GMT</pubDate>
    <dc:creator>ms</dc:creator>
    <dc:date>2015-02-07T11:30:53Z</dc:date>
    <item>
      <title>How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10860#M10474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I'm new to the community (but have used JMP since version 1), so I don't know where to put this question.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Have imported a file from SPSS (.sav) with several columns with value labels. I want to use the value labels (which are actual names) instead of the values (which are numbers). Recode seems not to have this function. Could anybody help? Thanks a lot in advance. Jens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 06:30:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10860#M10474</guid>
      <dc:creator>jenssjorslev</dc:creator>
      <dc:date>2015-02-06T06:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10861#M10475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;If I am understanding your question correctly.&lt;/P&gt;&lt;P&gt;You can turn the value labels on or off through the column properties.&lt;/P&gt;&lt;P&gt;In this example using the Consumer Preferences from the sample data I was able to &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;right-click on the column and uncheck the value label option.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8025_value label on or off.jpg" style="width: 1015px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1210iD29E2153B61E1AEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8025_value label on or off.jpg" alt="8025_value label on or off.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The column is no longer using the value label as shown below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8026_Value labels off.jpg" style="width: 771px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1211iFB4D96CF90FC3D2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8026_Value labels off.jpg" alt="8026_Value labels off.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 22:31:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10861#M10475</guid>
      <dc:creator>stan_koprowski</dc:creator>
      <dc:date>2016-10-18T22:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10862#M10476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stanley, Thanks for trying to help.&amp;nbsp; I know the function of value labels, but what I need is to change or substitute 1,2,3 values to No, Yes (e.g. as in your example) character values.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I need to join two tables with matching columns one of which has character values (same as the value labels in the other table, i.e., no coding was used), the other has numeric values (codes) with value labels. &lt;/P&gt;&lt;P&gt;Or is there a way to join the tables on the fly based on a column's value labels in one table and actual values in the matching column in the other table? &lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Jens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2015 06:24:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10862#M10476</guid>
      <dc:creator>jenssjorslev</dc:creator>
      <dc:date>2015-02-07T06:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10863#M10477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change Data Type to character and then use Recode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2015 11:30:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10863#M10477</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2015-02-07T11:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10864#M10478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for the tip. There more than 300 value labels, which I would have to enter manually in Recode - I hoped there would be a smarter way. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 07:25:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10864#M10478</guid>
      <dc:creator>jenssjorslev</dc:creator>
      <dc:date>2015-02-10T07:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10865#M10479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have a table of the codes and their values you could use the UPDATE command to add the appropriate value column.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 14:15:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10865#M10479</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2015-02-10T14:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10866#M10480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think what we would like (but don't have right now) is a "recode with value labels".&amp;nbsp; I too have wanted this feature from time to time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 15:55:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10866#M10480</guid>
      <dc:creator>KarenC</dc:creator>
      <dc:date>2015-02-10T15:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10867#M10481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good idea, Karen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jens, &lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt; It's not easy to get the labels out as data. Two ways I can think of:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;With scripting, you can use Get Value Labels and manually or programmatically manipulate the result to be like the Match() expression that Recode generates when you save it as a script.&lt;/LI&gt;&lt;LI&gt;Do a Tabulate on the variable and use Make Into Data Table on the result.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For #2, you'll need some way to match things up if they're not in a sorted one-to-one mapping. Steps for that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a copy of the values in a new column (without Value Labels)&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8040_tab1.png" style="width: 146px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1220i127A8DEBE91BC4B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8040_tab1.png" alt="8040_tab1.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Use Tabulate with both variables as category columns:&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8038_tab2.png" style="width: 102px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1221i1C0F7F46DFDC1B65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8038_tab2.png" alt="8038_tab2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8039_tab3.png" style="width: 138px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1222iEF5B29694EE74B61/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8039_tab3.png" alt="8039_tab3.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Use the Tabulate command Make into Data Table, to get a new table with no Value Labels properties.&lt;/LI&gt;&lt;LI&gt;Use Tables &amp;gt; Join to match on the raw values and get the new "labeled" column without Value Labels.&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 22:33:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10867#M10481</guid>
      <dc:creator>XanGregg</dc:creator>
      <dc:date>2016-10-18T22:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10868#M10482</link>
      <description>&lt;P&gt;I could not resist try to script Karen's idea. &lt;EM&gt;Get value Labels&lt;/EM&gt; return an expression with one argument: a list of "assignments", e.g.&amp;nbsp; 2 = "No". I come to think of two approaches: either use these (illegal) assignments directly or as Xan suggests manipulate them into a &lt;EM&gt;Match&lt;/EM&gt; expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below are my attempts at both approaches. The Match approach is faster here. For large tables and if many values lack labels the performance appears to become more equal. The Match code can probably be be improved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;open_example_table = Expr(
    dt = Open( "$SAMPLE_DATA/CrabSatellites.jmp" );
    col = Column( dt, "color" );
    col &amp;lt;&amp;lt; data type( character );
);
 
//1
open_example_table;
bt = HP Time();
// Direct assignment code
v = Arg( col &amp;lt;&amp;lt; get value labels(), 1 );
For( i = 1, i &amp;lt;= N Items( v ), i++,
    col[dt &amp;lt;&amp;lt; get rows where( col[] == Arg( v[i], 1 ) )] = Arg( v[i], 2 )
);
// End direct assignment
ht = HP Time();
t1 = ht - bt;
Close( dt, no save );
 
// 2
open_example_table;
bt = HP Time();
// code for building Match expression by string manipulation
match_expr = Parse(
    "Match( col[]," || Substitute( Char( Arg( col &amp;lt;&amp;lt; get value labels(), 1 ) ),
        "{", "",
        "=", ",",
        "}", ""
    ) || ",col[])"
);
For Each Row( col[] = match_expr );
// End Match
ht = HP Time();
t2 = ht - bt;
 
Show( t1, t2 );

 
t1 = 1729;
t2 = 1019;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-size: 14px; font-family: Courier; color: #f1f1f1;"&gt;//:*/&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 12:26:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10868#M10482</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2018-06-15T12:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10869#M10483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way to convert the column to a column of labels, is to copy the column, paste the data into a script editor window (or any text window). Then copy the data from the text window. Paste into a new character column in your original table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 18:32:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10869#M10483</guid>
      <dc:creator>chungwei</dc:creator>
      <dc:date>2015-02-12T18:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert column value labels to values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10870#M10484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to all who has helped with this. Been away from the computer for some time, but now back to working with JMP. I'll try the different suggestions and see which is the fastest for me. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 07:28:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-column-value-labels-to-values/m-p/10870#M10484</guid>
      <dc:creator>jenssjorslev</dc:creator>
      <dc:date>2015-03-16T07:28:11Z</dc:date>
    </item>
  </channel>
</rss>

