Skip to content
Prev 171989 / 398503 Next

Inefficiency of SAS Programming

Terry Therneau wrote:
If I were writing S code for this it would be dramatically different.  I 
would try to be efficient and elegant but would need to remember to be a 
teacher at the same time.  For example this kind of recode is super 
efficient and quick to program but would need good comments or a 
handbook to all of my code:  c(cat=1, dog=2, giraffe=3)[animal]
But I think the code is quite intuitive once you have used that 
construct once.

There also a lot of factoring of code that could be done as others have 
pointed out.
Well put.  I am amazed there hasn't been a revolt among SAS users 
decades ago.  The S approach is also easier to debug one line at a time.

Cheers,
Frank