<?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 do i sort according descending frequency of soc_term, pt_term and alphabetical for ties? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-sort-according-descending-frequency-of-soc-term-pt-term/m-p/811682#M320170</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;i'm trying to sort sort in descending freq of soc_term, and pt_term within soc_term, and then do alphabetical for ties for each level. i have included a data set.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Show us the desired output. I'm not sure I understand from the words exactly what you want.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, many of us will not download Excel files, as these can be security threats. The proper way to provide data is via &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;working&lt;/STRONG&gt;&lt;/FONT&gt; SAS data step code.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 14:50:51 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-05-05T14:50:51Z</dc:date>
    <item>
      <title>How do i sort according descending frequency of soc_term, pt_term and alphabetical for ties?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-sort-according-descending-frequency-of-soc-term-pt-term/m-p/811676#M320165</link>
      <description>&lt;P&gt;Hi, i'm trying to sort sort in descending freq of soc_term, and pt_term within soc_term, and then do alphabetical for ties for each level. i have included a data set.&lt;/P&gt;
&lt;P&gt;This is what the data looks like:&lt;/P&gt;
&lt;PRE&gt;soc_term	pt_term	aesevn	count
infestation	overall	0	3 (15.0)
infestation	overall	1	2
infestation	overall	2	1
infestation	overall	3	0
infestation	cough	0	2 (10.0)
infestation	cough	1	1
infestation	cough	2	1
infestation	cough	3	0
infestation	fever	0	1 (5.0)
infestation 	fever	1	1
infestation 	fever	2	0
infestation	fever	3	0
infestation	sweats	0	0
infestation	sweats	1	0
infestation	sweats	2	0
infestation	sweats	3	0
bodiy injury	overall	0	5 (25.0)
bodily injury	overall	1	1
bodily injury	overall	2	0
bodily injury	overall	3	3
bodily injury	laceration	0	2 (10.0)
bodily injury	laceration	1	1
bodily injury	laceration	2	0
bodily injury	laceration	3	1
bodily injury	contusion	0	3 (15.0)
bodily injury	contusion	1	0
bodily injury	contusion	2	0
bodily injury	contusion	3	2
chronic pain	overall	0	5 (25.0)
chronic pain	overall	1	2
chronic pain	overall	2	2
chronic pain	overall	3	1
chronic pain	back	0	3
chronic pain	back 	1	2
chronic pain	back	2	1
chronic pain	back	3	0
chronic pain	neck	0	2
chronic pain	neck 	1	0
chronic pain	neck	2	1
chronic pain	neck	3	1&lt;/PRE&gt;
&lt;P&gt;aesevn represents both an overall variable and severity level.&lt;/P&gt;
&lt;P&gt;0= total number of subjects per soc_term, pt_term&lt;/P&gt;
&lt;P&gt;1=mild&lt;/P&gt;
&lt;P&gt;2=moderate&lt;/P&gt;
&lt;P&gt;3= severe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having a hard time keeping all the groups together when i try to sort. Does anybody have a solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile = "your import path" 
DBMS = xlsx out = have1 replace ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 May 2022 14:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-sort-according-descending-frequency-of-soc-term-pt-term/m-p/811676#M320165</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-05-05T14:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do i sort according descending frequency of soc_term, pt_term and alphabetical for ties?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-sort-according-descending-frequency-of-soc-term-pt-term/m-p/811682#M320170</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;i'm trying to sort sort in descending freq of soc_term, and pt_term within soc_term, and then do alphabetical for ties for each level. i have included a data set.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Show us the desired output. I'm not sure I understand from the words exactly what you want.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, many of us will not download Excel files, as these can be security threats. The proper way to provide data is via &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;working&lt;/STRONG&gt;&lt;/FONT&gt; SAS data step code.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 14:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-sort-according-descending-frequency-of-soc-term-pt-term/m-p/811682#M320170</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-05T14:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do i sort according descending frequency of soc_term, pt_term and alphabetical for ties?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-sort-according-descending-frequency-of-soc-term-pt-term/m-p/811687#M320173</link>
      <description>&lt;P&gt;Thanks, PaigeMiller, for your response. I will keep that in mind in the future for when i present data. I figured since it was large, i mind as well attach it as an excel sheet. &lt;BR /&gt;&lt;BR /&gt;I have figured a solution for my issue, so i know longer need help with this. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 15:42:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-sort-according-descending-frequency-of-soc-term-pt-term/m-p/811687#M320173</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-05-05T15:42:45Z</dc:date>
    </item>
  </channel>
</rss>

