<?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: Getting the items of a character column as a list in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Getting-the-items-of-a-character-column-as-a-list/m-p/724463#M90687</link>
    <description>&lt;P&gt;The easiest way I know to do this is with an Associative Array&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

uniqueValues = associative array(dt:sex)&amp;lt;&amp;lt;get keys;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 16 Feb 2024 02:13:08 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-02-16T02:13:08Z</dc:date>
    <item>
      <title>Getting the items of a character column as a list</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-the-items-of-a-character-column-as-a-list/m-p/724461#M90686</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm simply trying to get a character column as a list. The column has duplicate entries and I would like a function that returns only the unduplicated rows. I tried using the "Get as matrix" function along with the " as column" function, but I kept getting different errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated. Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 01:24:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-the-items-of-a-character-column-as-a-list/m-p/724461#M90686</guid>
      <dc:creator>RA899</dc:creator>
      <dc:date>2024-02-16T01:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the items of a character column as a list</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-the-items-of-a-character-column-as-a-list/m-p/724463#M90687</link>
      <description>&lt;P&gt;The easiest way I know to do this is with an Associative Array&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

uniqueValues = associative array(dt:sex)&amp;lt;&amp;lt;get keys;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Feb 2024 02:13:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-the-items-of-a-character-column-as-a-list/m-p/724463#M90687</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-02-16T02:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the items of a character column as a list</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-the-items-of-a-character-column-as-a-list/m-p/724477#M90694</link>
      <description>&lt;P&gt;There are few different options all with their own disadvantages and advantages. Some are slower/faster, some take more code to write,... I usually use Summarize()&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

// Use associative array + get keys (slowest)
uniqnames1 = Associative Array(Column(dt, "name")) &amp;lt;&amp;lt; get keys;

// Use summarize (will convert numeric values to characters)
Summarize(dt, uniqnames2 = By(:name));

// Use summary + data table subscripting (or get values)
dt_summary = dt &amp;lt;&amp;lt; Summary(
	Group(:name),
	Freq("None"),
	Weight("None"),
	Link to original data table(0),
	private
);

uniqnames3 = dt_summary[0, "name"];
uniqnames4 = Column(dt_summary, "name") &amp;lt;&amp;lt; get values;
Close(dt_summary, no save);



Show(uniqnames1, uniqnames2, uniqnames3, uniqnames4);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Feb 2024 05:36:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-the-items-of-a-character-column-as-a-list/m-p/724477#M90694</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-16T05:36:11Z</dc:date>
    </item>
  </channel>
</rss>

