1
Sep

Tales from SAS author, Ron Cody

It was about 30 years ago that I wrote my first book, Applied Statistics and the SAS® Programming Language.  It was written on a PC with two floppy disk drives (one for the operating system, the other for my document) using a word processing software called WordStar.  It was all […]

The post Tales from SAS author, Ron Cody appeared first on The SAS Training Post.

Read More
1
Sep

NOTE: Visual Analytics V7.3 Has Arrived

Maintenance release 15w33 of SAS v9.4 arrived in August and it included a new version of Visual Analytics - version 7.3. This new release doesn't offer significant new features over its previous releases but I did notice that Visual Analytics Viewer's ... Read More
31
Aug

Gotcha with SAS, regular expressions, and end-of-line matching

Regular expressions are essential for sophisticated text processing, and it is generally easy to transfer knowledge of Perl regular expressions to the SAS functions prxparse, prxmatch, prxposn, etc. However, use caution with the end of line character ... Read More
31
Aug

Reading Hierarchical Data - Part 3

This post is the third and final in a series that illustrates three different solutions to "flattening" hierarchical data.  Don't forget to catch up with Part 1 and Part 2. Solution 2, from my previous post, created one observation per header record, with detail data in a wide format, like […]

The post Reading Hierarchical Data - Part 3 appeared first on The SAS Training Post.

Read More
31
Aug

Don’t WUSS Out – Five “Can’t Miss” Happenings at WUSS 2015

With all of the classes and presentations offered at this year’s Western Users of SAS Software conference, planning your activities can easily become overwhelming. Have no fear – we are here to help! Below are five “can’t miss” happenings at WUSS 2015! 1. Jennifer Waller’s Keynote Address - Wednesday, September 9 […]

Don’t WUSS Out – Five “Can’t Miss” Happenings at WUSS 2015 was published on SAS Users.

Read More
31
Aug

Compute the number of digits in an integer

The title of this blog post might seem strange, but I occasionally need to compute the number of digits in a number, usually because I am trying to stuff an integer value into a string. Each time, I have to derive the formula from scratch, so I am writing this […]

The post Compute the number of digits in an integer appeared first on The DO Loop.

Read More
31
Aug

It’s not so fun when it’s you being disrupted

Start-ups are all about buzzwords – innovation! disrupt! billion! We’re going to disrupt the something something something with our innovation that will bring us a billion dollars! Hurray! VCs , give me money! That all sounds really good until it’s you that’s being disrupted. We’re part of the Boom Startup Ed Tech accelerator for twelve […] Read More
30
Aug

SAS Visual Analytics: Get to the Point with a Geo Coordinate Map

Perhaps you’ve heard people talk about tornado alley – it’s an area down the middle of the US where tornadoes occur. Tornadoes are powerful storms – capable of sending a 2×4 wood board through a car door – scary.  In the first post of this series, I noted that successful geospatial data visualizations have geography as a character in the data story. If we wanted ... Post SAS Visual Analytics: Get to the Point with a Geo Coordinate Map appeared first on BI Notes for SAS® Users. Go to BI Notes for SAS® Users to subscribe.

[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
Read More
30
Aug

Column Splitter Take 2 - Merge

An anonymous person provided an alternative take on my %columnSplitter macro and I have to admit this one is easier to understand, has less code and runs about twice as fast. Congrats to whomever shared this alternative approach.

Here is the complete code using the merge statement:


%macro columnSplitter2(
columns = 3
, indsn =
, outdsn =
, varname =
) ;

%local dsid nobs increment ;

%if not %sysfunc( exist( &indsn. ) ) %then %do ;
%put %str(E)RROR: invalid input data set name: &indsn. ;
%return ;
%end ;

%if %isblank( &indsn. ) %then %do ;
%put %str(E)RROR: invalid output data set name: &outdsn. ;
%return ;
%end ;

%if %isblank( &varname. ) %then %do ;
%put %str(E)RROR: invalid variable name: &varname. ;
%return ;
%end ;

%let dsid = %sysfunc( open( &indsn. ) ) ;
%let nobs = %sysfunc( attrn( &dsid., nobs ) ) ;
%let dsid = %sysfunc( close( &dsid. ) ) ;
%let increment = %sysfunc( ceil( &nobs. / &columns. ) ) ;

data &outdsn. ;
merge
%do i = 1 %to &columns ;
&indsn(
keep = &varname
rename = ( &varname = &varname&i )
firstobs = %eval( ( &i. - 1 ) * &increment. + 1 )
obs = %eval( &i. * &increment. ) )
%end ;
;
run ;

%mend ;

%columnSplitter2(columns=3,indsn=states,outdsn=statessplit3,varname=statename)
Read More
28
Aug

Crowdsourcing Clinical Research & Development (Part 2)

Big pharma has only scratched the surface in terms of utilizing the potential for accelerating R&D though crowdsourcing. The Internet and social media have created a new public health ecosystem that spans across state borders. According to Google, the number of smart phone users globally was 1.75 billion in 2014, and is projected to increase to […] Read More
Back to Top