Tag: tips and tricks

How to format a macro variable

Would you like to format your macro variables? Easy!  Just use the %FORMAT function, like this: What?! You never heard of the %FORMAT function? Of course not, cuz it doesn’t exist! No problem. Just create it, like this: %macro format(value,format); %if %datatyp(&value)=CHAR %then %sysfunc(putc(&value,&format)); %else %left(%qsysfunc(putn(&value,&format))); %mend format; The %FORMAT […]

The post How to format a macro variable appeared first on SAS Learning Post.

3 steps to prepare your data for accurate predictive models in SAS Enterprise Miner

In this post I describe the important tasks of data preparation, exploration and binning.These three steps enable you to know your data well and build accurate predictive models. First you need to clean your data. Cleaning includes eliminating variable…

How severe is your missing data problem?

Datasets are rarely ready for analysis, and one of the most prevalent problems is missing data. This post is the first in a short series focusing on how to think about missingness, how JMP13 can help us determine the scope of missing data in a given ta…

Take that SAS option

Elizabeth is courageous. Scoliosis since birth, corrective spinal surgery replaced her spine with steel, tripping on stairs permanently broke her right ankle. Then she decided to come take yoga with me. To help ease back pain & reduce hip stress, I offered options like bent legs not cross. In class […]

The post Take that SAS option appeared first on SAS Learning Post.

Determining the size of a SAS data set

When developing SAS® data sets, program code and/or applications, efficiency is not always given the attention it deserves, particularly in the early phases of development. Since data sizes and system performance can affect a program and/or an application’s behavior, SAS users may want to access information about a data set’s […]

The post Determining the size of a SAS data set appeared first on SAS Learning Post.

How to control the name of Excel sheets when they are all created at once

Ok, so you know how to create multiple sheets in Excel, but can anyone tell me how to control the name of the sheets when they are all created at once? In the ODS destination for Excel, the suboption SHEET_INTERVAL is set to TABLE by default.  So what does that […]

The post How to control the name of Excel sheets when they are all created at once appeared first on SAS Learning Post.

Exploring the content of the DICTIONARIES table and VSVIEW SASHELP view

SAS® users have an easy and convenient way to quickly obtain useful information (referred to as metadata) about their SAS session with a number of read-only SAS DICTIONARY tables or SASHELP views. At any time during a SAS session, information about currently defined system options, libnames, tables, columns and their […]

The post Exploring the content of the DICTIONARIES table and VSVIEW SASHELP view appeared first on SAS Learning Post.

Character to Numeric Conversion in SAS

How many of you have been given a SAS data set with variables such as Age, Height, and Weight and some or all of them were stored as character values instead of numeric?  Probably EVERYONE! Yes, we all know how to do the old “swap and drop” (rename and convert), but […]

The post Character to Numeric Conversion in SAS appeared first on SAS Learning Post.