Join Jordan Bakerman for an in-depth discussion in this video Creating functions for the DATA step, part of SAS Programming for R Users, Part 1.
- [Instructor] Now SAS has a ton of built-in functions…that you can use in your data step.…Of course, it probably doesn't have all functions…that you want to use.…Maybe you want to go ahead and customize your own function.…To do so, we need to use the function compiler procedure…and all the functions we create here…again will be used inside of a data step.…The guts of the function compiler procedure…are very similar to the function function in R.…For example, in SAS we start with this function statement…and then specify the function name…that we're going to create…and then in parenthesis give it a list of arguments,…argument one comma followed by all the other arguments.…
If the input argument is a character value,…it needs a dollar sign operator.…And directly after the parenthesis…when you've specified your input arguments,…if the output value that we're creating…is also character valued,…we need to use the dollar sign operator again.…If you are creating character data,…always remember your length statement.…
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.