31
Oct

The next power of 2 and other tricks with logarithms

The other day I was doing some computations that caused me to wonder, "What is the smallest power of 2 that is greater than a given number?" The mathematics is straightforward. Given a number n, find the least value of k such that 2k ≥ n or, equivalently, k ≥ […] Read More
31
Oct

Likert Graphs

Just this morning I received a request for a brief survey from Apple on my feedback about the new iPhone6+.  Yes, I finally got one, dead last in the family.  The survey followed the usual format, with a number of questions on what I like or dislike about it, with […]
Read More
30
Oct

BioNews [10.30.14]

Top News Headline Company Type Abbott Laboratories Pays $250 Million For Menlo Park Startup Topera Abbott Laboratories & Topera Acquisition  Pfizer Wins FDA Accelerated Approval For Meningitis Vaccine Pfzier FDA Approval Volcano Corporation Laying Off 170 Workers Volcano Corporation Jobs AstraZeneca PLC Wins FDA Approval For Two-In-One Diabetes Pill AstraZeneca PLC FDA Aprroval Biotech Startup Factory […] Read More
30
Oct

Fulfilling goals

We all have goals…personal, professional, stretch goals, goals that will move us forward quickly. I’ve talked to many people who have a goal of someday writing a book. They always say “someday” in a wistful tone, because they never feel like they’ll have enough time or knowledge to be an […]
Read More
29
Oct

BioNews [10.29.14]

Top News Headline Company Type Sanofi Ousts CEO After Clash Over Strategy Sanofi Ousted CEO Xencor Regains All Rights From Amgen To Rare AutoImmune Disease Drug, Dumps Arthritis Hopes Xencor Regained Rights Gilead stock falls on Sovaldi sales miss Gilead Sciences, Inc. Sovaldi Sales Dallen Medical Receives FDA Clearance for Tensyn™ Band for AC/CC Joint […] Read More
29
Oct

SAS Metadata Server clusters: two ways to monitor

29
Oct

How to use frequency analysis to crack the Cryptoquote puzzle

Many people enjoy solving word games such as the daily Cryptoquote puzzle, which uses a simple substitution cipher to disguise a witty or wise quote by a famous person. A common way to attack the puzzle is frequency analysis. In frequency analysis you identify letters and pairs of letters (bigrams) […] Read More
28
Oct

Administration: What Demons Are at Your Command?

Charleston Cemetary

In the US, Halloween is celebrated by young children dressing up as ghouls, ghosts, and demons of other sorts.  I think the original idea of costumes was to be the scarier demon, which means if I look like a bad ass demon then maybe the truly bad ass demons will run away in fright. This made me wonder What do I truly find scary? Turns out it is not graveyards, ...

Post Administration: What Demons Are at Your Command? appeared first on BI Notes for SAS® Users. Go to BI Notes for SAS® Users to subscribe.

Read More
28
Oct

Get Top Rows

The POINT= option on a SAS SET statement can be used to read data in random order. All that is required is a pointer to that row and the use of the NOBS= option to identify the total number of rows. Because the data is read in a do loop, a STOP statement is required since there is no end of file indicator.

The below code can be used to read the top X rows in ascending or descending order.


/**************************************************************************
* Program: getTopRows.sas
* Author: Tom Bellmer
* Created: 28OCT2014
* Purpose: get the top X rows from a SAS data set
* Usage: %getTopRows( dsn = sashelp.class )
**************************************************************************/

%macro getTopRows(
dsn =
, rows = 10
, order = a
, outdsn = toprows
) ;

%if not %sysfunc( exist( &dsn. ) ) %then %do ;
%put %str(E)RROR: The data set &dsn. does not exist. ;
%return ;
%end ;

data &outdsn. ;
%if %lowcase( &order. ) = a %then %do ;
do i = 1 to &rows. ;
%end ;
%else %do ;
do i = totalobs to ( totalobs - &rows. + 1 ) by -1 ;
%end ;
set &dsn. nobs = totalobs point = i ;
output ;
end ;

stop ;
run ;

%mend ;

/* EOF: getTopRows.sas */
Read More
28
Oct

Are you at risk? Which blood types do vampires prefer?

SAS software has long been used to help analyze 'risk' - what about using it to help determine your risk of being attacked by a vampire?!? On a previous Halloween, I was the victim of a Vampire attack. Here's the photographic proof... Being the most common O+ blood type, I […]
Read More
Back to Top