This article introduces how to solve the pirate game with a recursive solving algorithm in SAS, and how to analyze and visualize the law behind the complex logic of the pirate game. If you join in a pirate game next time, you can know your destiny ahead of time to reap the benefits and avoid getting killed.
Tag: data step
Leonid Batkhan introduces multipurpose TRIMS function that removes any leading, trailing or both leading and trailing characters from SAS strings.
Just because you are using CAS actions doesn't mean you can forget about the powerful SAS DATA step. The dataStep.runCode CAS action is here! Welcome back to my SAS Users blog series CAS Action! - a series on fundamentals. I've broken the series into logical, consumable parts. If you'd like
SAS' Leonid Batkhan reveals how to use versatile iterative DO loops with index variable pertaining to SAS DATA steps.
In many programming languages, there is a function named eval() that can be used to evaluate an expression and return the result at run time. For example, in Python, the eval() function parses the expression passed to it and runs a Python expression or code within the program. Even Python
In natural language processing, word vectors play a key role in making technologies such as machine translation and speech recognition possible. Let's talk about how to transform word vector tables from long to wide in SAS, so we can potentially get sentence vectors to process further.
This article discusses how to use SAS to filter variables in a dataset based on the percentage of missing values or duplicate values. The missing value statistics can be implemented by either DATA step programming on your own or reusing the existing powerful PROC FREQ.
The DATA step remains a popular way to create and manipulate SAS data sets. Whether you are reshaping a data set entirely or simply assigning values to a new variable, there are numerous tips and tricks that you can use to save time and keystrokes.
After a marathon of a season, 162 games in each team's schedule to be precise, the stakes for Major League Baseball are higher in October, and postseason play is underway. Whether it's the renewal of an old rivalry, redemption for last year's runners up, or rooting for this season's breakout
In many movies, there is often a scene where the star says "We can do this the easy way, or the hard way" (and the hard way usually involves quite a bit of pain). So it is with interrogations ... and so it is with writing SAS code! Today I'm
The purpose of this blog post is to demonstrate a SAS coding technique that allows for calculations with multiple variables and multiple observations across a SAS dataset. This technique can be useful for working with time series, clinical trials, - in any data step calculations involving values from different observations.
I started young. Since I was 9 years old, I’ve always loved cooking delicious, tasty and healthy food, and feeding friends and family. My aunt still remembers the delicious chocolate soufflé that trembled and shook but would never collapse that I made for them when I was 18! Word spread.
A reader posed a question in the comments to an earlier Jedi SAS Trick, asking how to write the results of a DS2 DATA _NULL_ program to a text file. It's an interesting question, as DS2 currently has no text file handling statements or capabilities. Take, for example, this traditional
I was answering questions about SAS in a forum the other day, and it struck me how much easier it is to help folks if they can provide a snippet of data to go along with their program when asking others to help troubleshoot. This makes it easy to run
I'm gearing up to teach the next "DS2 Programming Essentials with Hadoop" class, and thinking about Warp Speed DATA Steps with DS2 where I first demonstrated parallel processing using threads in base SAS. But how about DATA step processing at maximum warp? For that, we'll need a massively parallel processing
While perusing the SAS 9.4 DS2 documentation, I ran across the section on the HTTP package. This intrigued me because, as DS2 has no text file handling statements I assumed all hope of leveraging Internet-based APIs was lost. But even a Jedi is wrong now and then! And what better
In this video, you learn how to use a SET statement in the DATA step to read a SAS data set using Base SAS. The DATA step is a very powerful tool for data manipulation. You can watch more video tutorials by visiting: support.sas.com/training/tutorial/. To learn more about the SAS
I've been a busy Jedi the last few months and have spent the bulk of my non-teaching days learning new Jedi SAS tricks to share with you. The finishing touches are going on to our brand-new, one and a half day DS2 Programming: Essentials class. It's rolling out on December 16
Stick to the basics. Did you ever get that advice? Two of the papers at MidWest SAS Users Group 2013 used that most fundamental of SAS processing concepts—the Program Data Vector—to show why users might encounter unexpected errors in their DATA step programs. In The Secret Life of DATA STEP,
Sometimes I need to "disassemble" a SAS data set into a DATA step program. It's kind of like creating a "freeze-dried" version of the data that you can carry around and use anywhere, re-hydrating it in the SAS session where you next need it. Some example uses for this: Build
Many of you know Mike Zdeb. He's a long-time SAS user and frequent presenter at SAS conferences. Zdeb is also a reviewer of many SAS Press books and author of his own SAS book, Maps Made Easy Using SAS. Zdeb contacted me after he read the May SAS Tech Report
In the previous episode, we built our own custom SAS function - a masterful trick indeed. Gordon Keener, a developer here at SAS, responded exuberantly "You think that's cool? - try THIS!" and proceeded to demonstrate prodigious powers with the SAS by using a custom function in a custom informat
Now, we all know by now that I'm not a programmer (that makes me very sad sometimes and may frustrate some of you at times), but I know a good paper and presentation when I see one. Christopher Bost knows how to teach a topic. I went to his Tuesday
Today, I have truly taken a chapter from the book - perhaps in more ways than one. I happened to notice that Art Carpenter's most recent book is titled, "Carpenter's Guide to Innovative SAS Techniques." Of course, you know that linking innovation and SAS are going to be a trigger