<?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 Creating data set from specific columns in other data set iml in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339637#M3328</link>
    <description>&lt;P&gt;I have a data set with a number of columns. I am wanting to create a data set from this using a selection of the columns:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In iml&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of&lt;/P&gt;&lt;P&gt;use = old_use[1:100, 1:75];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have&lt;/P&gt;&lt;P&gt;use = old_use[1:100, 1:50] + old_use[1:100, 53:57] + old_use[1:100, 59:75];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it is not returning the correct number of columns....&lt;/P&gt;</description>
    <pubDate>Thu, 09 Mar 2017 14:22:24 GMT</pubDate>
    <dc:creator>newSAS2017</dc:creator>
    <dc:date>2017-03-09T14:22:24Z</dc:date>
    <item>
      <title>Creating data set from specific columns in other data set iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339637#M3328</link>
      <description>&lt;P&gt;I have a data set with a number of columns. I am wanting to create a data set from this using a selection of the columns:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In iml&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of&lt;/P&gt;&lt;P&gt;use = old_use[1:100, 1:75];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have&lt;/P&gt;&lt;P&gt;use = old_use[1:100, 1:50] + old_use[1:100, 53:57] + old_use[1:100, 59:75];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it is not returning the correct number of columns....&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 14:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339637#M3328</guid>
      <dc:creator>newSAS2017</dc:creator>
      <dc:date>2017-03-09T14:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating data set from specific columns in other data set iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339649#M3329</link>
      <description>&lt;P&gt;The addition operator is trying to add matrices that do not have the same number of columns. Perhaps you mean to use the concatenation operator:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use = old_use[1:100, 1:50]&amp;nbsp;|| old_use[1:100, 53:57]&amp;nbsp;|| old_use[1:100, 59:75];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, a more efficient method is to form a vector of the column indices and then do a single extraction:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cols = (1:50) || (53:57) || (59:75);&lt;/P&gt;
&lt;P&gt;use = old_use[1:100, cols];&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 14:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339649#M3329</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-03-09T14:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating data set from specific columns in other data set iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339659#M3330</link>
      <description>&lt;P&gt;Thank you that works really well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 15:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339659#M3330</guid>
      <dc:creator>newSAS2017</dc:creator>
      <dc:date>2017-03-09T15:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating data set from specific columns in other data set iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339666#M3331</link>
      <description>&lt;P&gt;When posting questions, look if there's a suitable community. My moving of your post to the IML community probably triggered &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;'s attention.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 15:24:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339666#M3331</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-09T15:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating data set from specific columns in other data set iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339668#M3332</link>
      <description>&lt;P&gt;Thanks - will do&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 15:25:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Creating-data-set-from-specific-columns-in-other-data-set-iml/m-p/339668#M3332</guid>
      <dc:creator>newSAS2017</dc:creator>
      <dc:date>2017-03-09T15:25:25Z</dc:date>
    </item>
  </channel>
</rss>

