Join Jordan Bakerman for an in-depth discussion in this video Subsetting data, part of SAS Programming for R Users, Part 1.
- [Narrator] In this section,…I want to show you how to use a data step to subset columns,…or maybe subset rows, and finally subset observations…conditionally to a new sas data set.…Previously I showed you how to print…the unique levels of specific variables,…in this section I'll actually show you how to create…a data set of those unique levels as well.…And then you can go ahead and concatenate them together…to create a data set which is basically like a list…in this case, coming from R.…
I also want to show you how to subset conditionally,…for example maybe I want to pull out all the observations…in the cars data set where the origin is equal to Asia,…and, also perhaps Europe, and then I can row bind those…together to create a new sas data set.…Thus far, I've been saying to specify the data set…in the data statement and the set statement as the same.…Again, that would overwrite the existing data table…with the changes.…So, to subset a new data set, I'll specify the data set…I want to pull from in the set 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.