Tag: data step
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
I think this DATA step Post-It author may be a bit like my mother. When I was a child, my mother was always coaching me on two things: being independent and being efficient. I believe those are the two traits she considered most admirable in a person. It's little wonder
Art Carpenter’s newest book, Carpenter’s Guide to Innovative SAS Techniques, offers advanced SAS programmers an all-in-one programming reference that includes advanced topics not easily found outside the depths of SAS documentation or more advanced training classes. No matter how you approach the use of SAS software, the techniques provided in
In the Star Wars movie, Obi-wan could just wave his hand, mutter a few words, and the stormtroopers would "move along". How the power of the Force makes ridding yourself of problematic characters so much easier! I recently was invited to become an alternate instructor for Ron Cody’s SAS Business
“I really wish someone had shown me this function in SAS sooner, because it’s saved me a ton of time and effort,” said Brandi Rhoads as she opened her presentation at the Western Users of SAS Software (WUSS) conference in San Francisco.
Picture this – a student grabs the Programming 1 textbook, scans it quickly seemingly searching for something specific, and shakes his head indicating an unsuccessful search. He plants himself smack dab in the front row, looks me squarely in the eye, raises one eyebrow quizzically and says, “Bad words?” I
Most SUG presentations are written in PowerPoint – they may even be written in Word first, and then fancied up a bit in PowerPoint – but they are rarely written in SAS. But Louise Hadden, from Abt Associates Inc, had a need to produce a lot of PDF presentations. She
SAS-based processes are critical to many organizations, but sometimes the trickiest part of your job falls into one or both of these activities: Getting stuff from the outside world "into" SAS. (Once it's in SAS, as many of you know, the world is your oyster.) Getting the output of your
When I joined SAS Institute I had no knowledge of SAS. I studied, researched and practiced. The questions I asked would make even the most seasoned programmer blush a beetroot red! Those were an intense nine months—I’ll tell you more in a later post about the learning system at SAS