Join Jordan Bakerman for an in-depth discussion in this video The FORMAT statement, part of SAS Programming for R Users, Part 1.
- [Instructor] Now, how do we actually apply the format?…So in my print procedure,…I'm going to use the format statement,…and then I'm going to specify the variable in my data set.…Let's say it's salary.…And then immediately following the variable name,…I'm going to specify the format I want to apply…to that variable.…So I'm applying dollar8 to the salary variable.…And I'm applying the month, day, year 10 format…to the hire_date variable.…So salary now has a dollar sign and a comma,…and hire_date is now displayed so I can actually read it.…
There are a ton of different built-in SAS formats…that you can use.…Definitely check the online doc page for those.…If you don't find what you're looking for,…we can go ahead and create our own formats.…And we actually already saw PROC FORMAT…in the first demonstration with the MCMC procedure.…So PROC FORMAT allows us…to create our own user-defined formats.…And to do so we'll use individual value statements…and then name the format.…So again, if we're working with character data…
Note: You can visit the SAS site to obtain a copy of the software, and use the company's online data sets to do the course exercises.
- SAS University Edition
- Working in SAS Studio
- Using tasks and snippets in SAS Studio
- Determining power using simulation
- SAS procedure syntax
- Creating datasets manually in the DATA step
- Importing raw data files
- Creating new variables and conditional processing
- Match-merging data sets
Skill Level Beginner
Descriptive Healthcare Analytics in Rwith Monika Wahi4h 15m Advanced
1. Introduction and Working in SAS
2. Importing and Reporting Data
3. Creating New Variables, Functions, and Data Tables
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.