<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/sas</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 12:41:03 GMT</pubDate>
<item>
<title>(SAS) person age function - csrsen</title>
<link>http://snipplr.com/view/70109/person-age-function/</link>
<description><![CDATA[ <p>For proper calculation of human age using DOB and an as-of date.</p> ]]></description>
<pubDate>Wed, 27 Feb 2013 07:15:57 GMT</pubDate>
<guid>http://snipplr.com/view/70109/person-age-function/</guid>
</item>
<item>
<title>(SAS) Co Word Analysis with SAS - webonomic</title>
<link>http://snipplr.com/view/68863/co-word-analysis-with-sas/</link>
<description><![CDATA[ <p>Text Miner uses a compressed representation of the term-by-doc frequency matrix. You will find an OUT data set in the project data directory of  your text miner run. Its label will include the string "OUT" in it.  Since a 30,000 document collection will have as many as 500,000 to a million distinct terms, be sure to restrict your terms of interest with a start list. I give an example of creating the cooccurrence matrix with the following code which expands the compressed version to an uncompressed version and then computes the co-occurrence count with proc corr and the sscp option.</p> ]]></description>
<pubDate>Sun, 02 Dec 2012 07:43:07 GMT</pubDate>
<guid>http://snipplr.com/view/68863/co-word-analysis-with-sas/</guid>
</item>
<item>
<title>(SAS) Using Alternating Background Color with PROC REPORT - webonomic</title>
<link>http://snipplr.com/view/68058/using-alternating-background-color-with-proc-report/</link>
<description><![CDATA[ <p>Adding alternating row of color to make proc report output easier to read.</p> ]]></description>
<pubDate>Fri, 02 Nov 2012 02:33:20 GMT</pubDate>
<guid>http://snipplr.com/view/68058/using-alternating-background-color-with-proc-report/</guid>
</item>
<item>
<title>(SAS) Specify colors in SAS statistical graphics procedures - webonomic</title>
<link>http://snipplr.com/view/67903/specify-colors-in-sas-statistical-graphics-procedures/</link>
<description><![CDATA[ <p>If you want to see some of the color names that SAS recognizes, run the following statements, which will print a list of colors to the SAS log:</p> ]]></description>
<pubDate>Wed, 24 Oct 2012 06:53:06 GMT</pubDate>
<guid>http://snipplr.com/view/67903/specify-colors-in-sas-statistical-graphics-procedures/</guid>
</item>
<item>
<title>(SAS) Default Macro Values - webonomic</title>
<link>http://snipplr.com/view/67710/default-macro-values/</link>
<description><![CDATA[ <p>Quite often it is necessary to set a default value for a macro parameter that is passed to a program. If the program is a macro, the %IF statement can be used to check if the value is provided and provide a default value if not. Since %IF statements are not allowed outside of macros, that technique won't work for a non-macro program (e.g., a file/program that is %INCLUDEd). The following code snippet demonstrates the use of the COALESCEC function to assign a default value.

since macro is a text manipulation facility, the coalesceC function is used regardless of whether the expected value for the parameter is numeric (i.e., everything in macro is interpretted as a character string).</p> ]]></description>
<pubDate>Sat, 13 Oct 2012 00:28:05 GMT</pubDate>
<guid>http://snipplr.com/view/67710/default-macro-values/</guid>
</item>
<item>
<title>(SAS) sas wedit find next and prev - Pavonz</title>
<link>http://snipplr.com/view/66143/sas-wedit-find-next-and-prev/</link>
<description><![CDATA[ <p>sas wedit find next and prev</p> ]]></description>
<pubDate>Sat, 14 Jul 2012 22:25:19 GMT</pubDate>
<guid>http://snipplr.com/view/66143/sas-wedit-find-next-and-prev/</guid>
</item>
<item>
<title>(SAS) Creating a report of Twitter hashtag activity - webonomic</title>
<link>http://snipplr.com/view/64529/creating-a-report-of-twitter-hashtag-activity/</link>
<description><![CDATA[ <p>The program uses the XML LIBNAME engine, FILENAME URL, SGPLOT procedure, and a simple PROC PRINT to create a report of recent Twitter activity around a specified hashtag.</p> ]]></description>
<pubDate>Fri, 13 Apr 2012 01:02:52 GMT</pubDate>
<guid>http://snipplr.com/view/64529/creating-a-report-of-twitter-hashtag-activity/</guid>
</item>
<item>
<title>(SAS) [SAS] ETL Email Noticiation - ccw</title>
<link>http://snipplr.com/view/64217/sas-etl-email-noticiation/</link>
<description><![CDATA[ <p>An example to notify users with ETL job status</p> ]]></description>
<pubDate>Thu, 29 Mar 2012 16:13:29 GMT</pubDate>
<guid>http://snipplr.com/view/64217/sas-etl-email-noticiation/</guid>
</item>
<item>
<title>(SAS) [SAS] Applying ACT - ccw</title>
<link>http://snipplr.com/view/64163/sas-applying-act/</link>
<description><![CDATA[ <p>Applying Access Control Template to specific objects</p> ]]></description>
<pubDate>Mon, 26 Mar 2012 15:07:42 GMT</pubDate>
<guid>http://snipplr.com/view/64163/sas-applying-act/</guid>
</item>
<item>
<title>(SAS) [SAS] JSON output - ccw</title>
<link>http://snipplr.com/view/64161/sas-json-output/</link>
<description><![CDATA[ <p>SAS code to output in JSON format</p> ]]></description>
<pubDate>Mon, 26 Mar 2012 14:44:52 GMT</pubDate>
<guid>http://snipplr.com/view/64161/sas-json-output/</guid>
</item>
<item>
<title>(SAS) Selecting a Random Sample of Observations - webonomic</title>
<link>http://snipplr.com/view/63355/selecting-a-random-sample-of-observations/</link>
<description><![CDATA[ <p>You can use the POINT option of the SET statement to efficiently select a random sample of observations from a SAS data set. In addiiton to any statistical reasons for drawing a random sample, the technique is also useful to create test data from a large file. The program shown here efficiently samples a large data set.
It reads only the observations that have been selected using the POINT option.
You assign a variable that is the desired sample size. The example here selects a 10% sample. You can also assign a fixed value (e.g., 100).
The DO loop is iterated for each observation
The uniform function is compared to the percent of observations still to be selected
If the observation is selected, it is read and output and the number needed is decremented by 1
Regardless the number of observations left is reduced by 1
The STOP statement is very important as without it, the DATA step will enter an infinite loop.
This technique works by modifying the threshold as observations are read and selected. Every observation has the same probability of being selected so the technique is statistically valid (If you are a statistician, you probably know this. If not, the analogy of drawing straws is the logic behind this.)</p> ]]></description>
<pubDate>Thu, 16 Feb 2012 02:08:13 GMT</pubDate>
<guid>http://snipplr.com/view/63355/selecting-a-random-sample-of-observations/</guid>
</item>
<item>
<title>(SAS) Convert SAS dataset to Text file - webonomic</title>
<link>http://snipplr.com/view/60841/convert-sas-dataset-to-text-file/</link>
<description><![CDATA[ <p>This SAS macro will convert a dataset to a text file</p> ]]></description>
<pubDate>Tue, 15 Nov 2011 14:20:12 GMT</pubDate>
<guid>http://snipplr.com/view/60841/convert-sas-dataset-to-text-file/</guid>
</item>
<item>
<title>(SAS) Create new folder with simple checks - rambles</title>
<link>http://snipplr.com/view/60483/create-new-folder-with-simple-checks/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 02 Nov 2011 20:57:32 GMT</pubDate>
<guid>http://snipplr.com/view/60483/create-new-folder-with-simple-checks/</guid>
</item>
<item>
<title>(SAS) Text to SAS Variable Name - rambles</title>
<link>http://snipplr.com/view/58641/text-to-sas-variable-name/</link>
<description><![CDATA[ <p>Useful functions to ensure (99% of the time...) that a piece of text can be used to name a SAS variable.  NOTE: This won't work with SAS literals.</p> ]]></description>
<pubDate>Tue, 13 Sep 2011 19:10:02 GMT</pubDate>
<guid>http://snipplr.com/view/58641/text-to-sas-variable-name/</guid>
</item>
<item>
<title>(SAS) Simple hash lookup - rambles</title>
<link>http://snipplr.com/view/57871/simple-hash-lookup/</link>
<description><![CDATA[ <p>Simple, basic syntax for SAS lookup</p> ]]></description>
<pubDate>Tue, 16 Aug 2011 19:21:14 GMT</pubDate>
<guid>http://snipplr.com/view/57871/simple-hash-lookup/</guid>
</item>
<item>
<title>(SAS) Summary datasets using hashes - rambles</title>
<link>http://snipplr.com/view/54497/summary-datasets-using-hashes/</link>
<description><![CDATA[ <p>This snippet comes directly from Paul M. Dorfman's paper on programming with Hash objects.  The hash object is useful when summarising huge datasets that aren't sorted and indexed by the variable(s) to be summarised; they can often be quicker than proc summary and are certainly less machine intensive.</p> ]]></description>
<pubDate>Fri, 27 May 2011 19:45:20 GMT</pubDate>
<guid>http://snipplr.com/view/54497/summary-datasets-using-hashes/</guid>
</item>
<item>
<title>(SAS) Output list of files and folders to a dataset - rambles</title>
<link>http://snipplr.com/view/54424/output-list-of-files-and-folders-to-a-dataset/</link>
<description><![CDATA[ <p>This simple, straightforward method should work on multiple platforms (other methods involving OS specific commands and pipes are less flexible).</p> ]]></description>
<pubDate>Thu, 26 May 2011 20:02:18 GMT</pubDate>
<guid>http://snipplr.com/view/54424/output-list-of-files-and-folders-to-a-dataset/</guid>
</item>
<item>
<title>(SAS) Exporting Multiple Data Sets to One Spreadsheet - webonomic</title>
<link>http://snipplr.com/view/50839/exporting-multiple-data-sets-to-one-spreadsheet/</link>
<description><![CDATA[ <p>It's easy to export several data sets to one Excel spreadsheet with each data set in a separate worksheet.This example exports three SAS data sets (work.region, work.county and work.district) to the same spreadsheet (results.xls).</p> ]]></description>
<pubDate>Sat, 19 Mar 2011 07:32:29 GMT</pubDate>
<guid>http://snipplr.com/view/50839/exporting-multiple-data-sets-to-one-spreadsheet/</guid>
</item>
<item>
<title>(SAS) Convert character field in to SAS date field - mprabhuram</title>
<link>http://snipplr.com/view/49898/convert-character-field-in-to-sas-date-field/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 02 Mar 2011 09:52:13 GMT</pubDate>
<guid>http://snipplr.com/view/49898/convert-character-field-in-to-sas-date-field/</guid>
</item>
<item>
<title>(SAS) Correcting for unbalanced quotes - Stat_Geek</title>
<link>http://snipplr.com/view/49079/correcting-for-unbalanced-quotes/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 16 Feb 2011 10:39:40 GMT</pubDate>
<guid>http://snipplr.com/view/49079/correcting-for-unbalanced-quotes/</guid>
</item>
</channel>
</rss>