<?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 Extract portion of taxonomic string (i.e., kingdom, phyla, etc.) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874017#M345277</link>
    <description>&lt;P&gt;Hi there! I have taxonomic data with the phyla through genus listed from microbiome 16s sequencing. I want to pull just the 'Family' name out of the string, but each character string is different due to the nature of each taxonomy identified within the sample.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have included a screenshot of the character variable "taxon" that has this string information. It's a character variable with 106 length. (I cannot share the data in full so I hope the image is enough context).&amp;nbsp;Is there an approach you'd recommend taking to pull out this substring from variable starting positions? I do have a delimiter of sorts - the " / ". The most efficient method would be useful as I have over 1 million records.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83637i4F965737A0C077FB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 22:35:46 GMT</pubDate>
    <dc:creator>lsandell</dc:creator>
    <dc:date>2023-05-04T22:35:46Z</dc:date>
    <item>
      <title>Extract portion of taxonomic string (i.e., kingdom, phyla, etc.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874017#M345277</link>
      <description>&lt;P&gt;Hi there! I have taxonomic data with the phyla through genus listed from microbiome 16s sequencing. I want to pull just the 'Family' name out of the string, but each character string is different due to the nature of each taxonomy identified within the sample.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have included a screenshot of the character variable "taxon" that has this string information. It's a character variable with 106 length. (I cannot share the data in full so I hope the image is enough context).&amp;nbsp;Is there an approach you'd recommend taking to pull out this substring from variable starting positions? I do have a delimiter of sorts - the " / ". The most efficient method would be useful as I have over 1 million records.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83637i4F965737A0C077FB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 22:35:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874017#M345277</guid>
      <dc:creator>lsandell</dc:creator>
      <dc:date>2023-05-04T22:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extract portion of taxonomic string (i.e., kingdom, phyla, etc.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874018#M345278</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/346202"&gt;@lsandell&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to pull just the 'Family' name out of the string, ...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What is the&amp;nbsp;'Family' name in the strings listed?&lt;/P&gt;
&lt;P&gt;What is the substring you need as an outcome after parsing every taxon string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 22:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874018#M345278</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-05-04T22:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Extract portion of taxonomic string (i.e., kingdom, phyla, etc.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874019#M345279</link>
      <description>&lt;P&gt;So what is your business rule for identifying the family name in the string?&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 22:50:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874019#M345279</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-04T22:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Extract portion of taxonomic string (i.e., kingdom, phyla, etc.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874031#M345288</link>
      <description>&lt;P&gt;Thanks! It's the name before the final forward slash (/) [i.e., second to last alphabetic portion].&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 01:02:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874031#M345288</guid>
      <dc:creator>lsandell</dc:creator>
      <dc:date>2023-05-05T01:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Extract portion of taxonomic string (i.e., kingdom, phyla, etc.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874032#M345289</link>
      <description>&lt;P&gt;Just one word from the whole string (what's in between the slashes). The target string is the name before the final forward slash (/) [i.e., second to last alphabetic portion].&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 01:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874032#M345289</guid>
      <dc:creator>lsandell</dc:creator>
      <dc:date>2023-05-05T01:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract portion of taxonomic string (i.e., kingdom, phyla, etc.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874035#M345292</link>
      <description>&lt;P&gt;Try this. The SCAN function is finding the second word reading from the right:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  string = 'w1/w2/w3/w4/w5/w6';
  Family = scan(string,-2,'/');
  put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 May 2023 01:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-portion-of-taxonomic-string-i-e-kingdom-phyla-etc/m-p/874035#M345292</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-05T01:29:06Z</dc:date>
    </item>
  </channel>
</rss>

