Tag: sas tip

Webpage scraping made easy with PROC HTTP

SAS Press author Matt Windham shows you how to use the SAS procedure PROC HTTP to grab raw data from a website.
The post Webpage scraping made easy with PROC HTTP appeared first on SAS Learning Post.

When a variable is not a variable

SAS variables are variables in the statistics sense, not the computer programming sense. SAS has what many computer languages call “variables,” it just calls them “macro variables.” Knowing the difference between SAS variables and SAS macro variables…

Using regular expressions to verify the pattern of character data

Wait!  Don’t close this window.  I understand that regular expressions can be very complicated (yes, there are many books on the subject), but some basic expressions to test patterns such as zip codes or telephone numbers are not that difficult.  In addition, you can sometimes use Google to search for […]

The post Using regular expressions to verify the pattern of character data appeared first on SAS Learning Post.

Stratified random sample: What’s efficient?

In a previous blog, Random Sampling: What’s Efficient?, I discussed the efficiency of various techniques for selecting a simple random sample from a large SAS dataset.  PROC SURVEYSELECT easily does the job: proc surveyselect data=large out=sample method=srs /* simple random sample */ rate=.01; /* 1% sample rate */ run; Note: […]

The post Stratified random sample: What’s efficient? appeared first on SAS Learning Post.

The difference between the Subsetting IF and the IF—THEN—ELSE—IF statement

My river walk last week turned into a spectacular fall show. But if it rains this week in San Antonio, like the weatherman predicts, what will I do? In the coming days, I’ll be presenting at two user groups,  one in eastern Canada in Halifax, and the other all the […]

The post The difference between the Subsetting IF and the IF—THEN—ELSE—IF statement appeared first on SAS Learning Post.