When deleting non-complete duplicates in SAS, in each duplicate set you may want to keep a particular record identified by a rule: it may be the oldest, newest, first, or last observation in each set. You need a identifier to be unique, but you canR…
Tag: Basics
C# Dictionary of US State Abbreivation to Names using SAS
I need C# code to convert United States state postal abbreviations (like AL) to full state names (like Alabama), but I’m afraid of making a typo retyping the abbreviation list from the USPS—and that just seems tedious. However, it’s e…
Strip Non-Printable ASCII Characters (SAS)
Say in your SAS data set, which comes from a text file, XML, or database, has non-ASCII characters that look like garbage—perhaps an odd square. These are probably control characters that mean something to some system, but they may be useless to …
Connecting SAS to Access 2007 (.accdb)
Here is a working example of how to connect SAS 9.1.3 SP4 to a Microsoft Office Access 2007 .accdb data source. First, let’s use a pass through query. The file is called c:\saves.accdb and contains a table called table1. proc sql; /* create an OD…
Simple PROC BOXPLOT example
Here’s a simple PROX BOXPLOT showing how to produce Box and Whisker graphs in SAS. data presidents; input name $ cm 3.; datalines; George_W_Bush 183.1 George_W_Bush 182.9 George_W_Bush 183.3 George_W_Bush 188.3 Barrack_Obama 188.0 Barrack_Obama 1…