Would you like to format your macro variables in SAS? Good news. It's easy! Just use the %FORMAT function, like this: %let x=1111; Log %put %format(&x,dollar11.); $1,111 %put %format(&x,roman.); MCXI %put %format(&x,worddate.); January 16, 1963 %let today=%sysfunc(today()); %put %format(&today,worddate.); October 13, 2017 %put %format(Macro,$3.); Mac What?! You never [...]
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 variables which have uneven spread across the target variable. I give an [...]
The post 3 steps to prepare your data for accurate predictive models in SAS Enterprise Miner appeared first on SAS Learning Post.
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 table, and how to [...]
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 [...]
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 [...]
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.
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.
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 […]
This SAS Jedi is very excited about the SAS 9.4 M4 release, which brought many wonderful gifts just in time for Christmas. So in the interest of extending the Christmas spirit, I'm going to blog about some of my favorites! I've long loved the SAS DO statement variant which allows […]
The post SAS Jedi Christmas - SAS 9.4 M4 DS2 Do Loop Upgrade appeared first on SAS Learning Post.
JMP supports many date/time formats, but some less conventional (or downright esoteric) formats still crop up from time to time. To many users, converting an oddly formatted date/time from string to numeric form is a frustrating endeavor, requiring custom formulas and an assortment of seldom-used string and numeric operations. With the Custom Date Formula Writer, you can simply point-and-click your date/time troubles away, generating the necessary formula without writing code.
To begin, install the Data Table Tools Add-in and navigate to the formula writer:
Now the new date column is just four steps away:
- Choose the table and column containing the character date/time data.
- Point and click to delimit the "words" in the data.
- Specify the meaning of each word, and various options, using drop-down menus and radio buttons.
- Press the "Build formula column" button.
Here's what the process looks like:
Step 1: Choose the table and date/time column.
Step 2: Point and click the text to delimit the data, then press the "Apply delimiting and choose words" button.
Step 3: Complete the dialog using the radio buttons and drop-down menus to select options and word roles.
Step 4: Click the "Build Formula Column" button to write the new formula column to the data table.
I'll be blogging on more table tools in the future, so stay tuned!
Note: This blog post is first in a series exploring the various features of the Data Table Tools add-in.
The post Data table tools part 1: Custom Date Formula Writer appeared first on JMP Blog.