Posts Tagged ‘ sas programming ’

Computing polar angles from coordinate data

June 10, 2015
By
Computing polar angles from coordinate data

Equations that involve trigonometric functions can have infinitely many solutions. For example, the solution to the equation tan(θ)=1 is θ = π/4 + kπ, where k is any integer. In order to obtain a unique solution to the equation, we define the "arc" functions: inverse trigonometric functions that return a

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Computing polar angles from coordinate data

DATA STEP text file tricks

June 8, 2015
By

When reading a text file (common extensions: TXT, DAT; or, for the adventurous: HTML) with the DATA STEP, you should always view several lines from the text file, and compare to the record layout, before completing the INPUT statement.  There are many ways to view a text file.  I use

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on DATA STEP text file tricks

Five reasons to use ODS EXCLUDE to suppress SAS output

May 28, 2015
By

I previously wrote about the best way to suppress output from SAS procedures. Suppressing output is necessary in simulation and bootstrap analyses, and it is useful in other contexts as well. In my previous article, I wrote, "many programmers use ODS _ALL_ CLOSE as a way to suppress output, but

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Five reasons to use ODS EXCLUDE to suppress SAS output

Dataset too big for PROC PRINT?

May 18, 2015
By

Dataset too big for PROC PRINT? One weird trick solves your problem! proc print data=bigdata (obs=10); run; The OBS= dataset option specifies the last observation to process from an input dataset. In the above example, regardless of dataset size, only the first 10 observations are printed; an easy way to

The post Read more »

Tags: , , , ,
Posted in SAS | Comments Off on Dataset too big for PROC PRINT?

10 reasons to learn SAS code even when you have Enterprise Guide

May 6, 2015
By

New York City Mayor, Michael Bloomberg made a new-year's resolution to learn code. Apple’s Steve Jobs said, “I think everybody in this country should learn how to program a computer because it teaches you how to think.” President Barrack Obama said, "Don't just buy a new video game, make one.

The post Read more »

Tags: , , , , ,
Posted in SAS | Comments Off on 10 reasons to learn SAS code even when you have Enterprise Guide

How to convert a Unix datetime to a SAS datetime

April 16, 2015
By
How to convert a Unix datetime to a SAS datetime

I watched with wonder as each of my daughters learned how to "tell time." Early in their primary school careers, they brought home worksheets that featured clock faces with big-hand/little-hand configurations that they had to decipher, and exercises that asked them to draw the hands as they should appear given

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on How to convert a Unix datetime to a SAS datetime

How to compare SAS programs in SAS Enterprise Guide

April 3, 2015
By
How to compare SAS programs in SAS Enterprise Guide

Copy/paste is my favorite method for creating new SAS programs. In my work projects, I maintain a sort of genealogy of SAS programs, because the DNA of one program can be used to spawn many other SAS programs as its progeny. When things (inevitably) aren't working as I intend in

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on How to compare SAS programs in SAS Enterprise Guide

On the number of permutations supported in SAS software

March 25, 2015
By
On the number of permutations supported in SAS software

There's "big," and then there is "factorial big." If you have k items, the number of permutations is "k factorial," which is written as k!. The factorial function gets big fast. For example, the value of k! for several values of k is shown in the following table. You can

The post Read more »

Tags: ,
Posted in SAS | Comments Off on On the number of permutations supported in SAS software

Proc-x is looking for sponsors!

Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.