<?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 select a subset of columns and rows from a data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-select-a-subset-of-columns-and-rows-from-a-data-table/m-p/381665#M63215</link>
    <description>&lt;P&gt;There are a couple of issues.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;You are using double "||" instead of single "|" for the OR in your Select Where&lt;/LI&gt;
&lt;LI&gt;In your Subset, using Selected Rows( 1 ) indicates to JMP to only subset the selected rows&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I also changed your column reference to Instrument Type.&amp;nbsp; There is no need to have it in quotes.&amp;nbsp; It does not contain any special characters that might confuse JMP, so therefore the quotes are not necessary.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Select where(
	:Timepoint == "cell value 1" | :Timepoint == "cell value 2" | :Timpeoint ==
	"cell value 3"
);
dt_subset = dt &amp;lt;&amp;lt; Subset(
	Columns( :Instrument Type, :Donor ID, :Timepoint, :Instrument Channel, :Run date ),
	selected rows( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 01 May 2021 18:37:11 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-05-01T18:37:11Z</dc:date>
    <item>
      <title>How to select a subset of columns and rows from a data table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-a-subset-of-columns-and-rows-from-a-data-table/m-p/381653#M63214</link>
      <description>&lt;P&gt;I have done a Google search and come across the top hits, things like&amp;nbsp;&lt;A href="https://www.jmp.com/china/support/help/13-2/JSG_DataTables_21.shtml" target="_blank" rel="noopener"&gt;https://www.jmp.com/china/support/help/13-2/JSG_DataTables_21.shtml&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;LI-MESSAGE title="How to select rows based on multiple criteria?" uid="7014" url="https://community.jmp.com/t5/Discussions/How-to-select-rows-based-on-multiple-criteria/m-p/7014#U7014" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;but nothing specifically states how to select both columns and rows in the same line of code. I tried it and doing one seems to interfere with the other. Or is there a way to store the output of the first step (column subset) into a variable and then do the second (row subset)? I didn't try that yet, the idea just came to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's my code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Select where( Timepoint == "cell value 1" || Timepoint == : "cell value 2" || Timpeoint == "cell value 3"  );
dt_subset = dt &amp;lt;&amp;lt; Subset (Columns(:"Instrument Type", :Donor ID, :Timepoint, :Instrument Channel, :Run date));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:29:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-a-subset-of-columns-and-rows-from-a-data-table/m-p/381653#M63214</guid>
      <dc:creator>mostarr</dc:creator>
      <dc:date>2023-06-10T23:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to select a subset of columns and rows from a data table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-select-a-subset-of-columns-and-rows-from-a-data-table/m-p/381665#M63215</link>
      <description>&lt;P&gt;There are a couple of issues.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;You are using double "||" instead of single "|" for the OR in your Select Where&lt;/LI&gt;
&lt;LI&gt;In your Subset, using Selected Rows( 1 ) indicates to JMP to only subset the selected rows&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I also changed your column reference to Instrument Type.&amp;nbsp; There is no need to have it in quotes.&amp;nbsp; It does not contain any special characters that might confuse JMP, so therefore the quotes are not necessary.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Select where(
	:Timepoint == "cell value 1" | :Timepoint == "cell value 2" | :Timpeoint ==
	"cell value 3"
);
dt_subset = dt &amp;lt;&amp;lt; Subset(
	Columns( :Instrument Type, :Donor ID, :Timepoint, :Instrument Channel, :Run date ),
	selected rows( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 01 May 2021 18:37:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-select-a-subset-of-columns-and-rows-from-a-data-table/m-p/381665#M63215</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-05-01T18:37:11Z</dc:date>
    </item>
  </channel>
</rss>

