From the course: SAS Programming for R Users, Part 1
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Reporting data - SAS Tutorial
From the course: SAS Programming for R Users, Part 1
Reporting data
- [Instructor] Now that we know how to get our data into SAS, we want to to ahead and report the data and bring back just a few features in a report. So here I'm going to use a few different PROC Steps and return some results. So in R when I read in a data set, I like to go ahead and use the head function, just to make sure I read it in correctly. The names function, just to see the variable names. What's the dimension of my data set. The unique levels of my classification variables. And then maybe I want to go ahead and print variables conditionally. How would I do all this in SAS? The first procedure is the Contents Procedure. And it provides the same information as the functions dim and names in R. So it's going to provide the number of observations, the number of variables, as well as the variable names in the data set. And as a best practice, I like to use the varnum option so SAS will print the variables to the results page in the order that they appear in the data set. But of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Creating datasets manually in the DATA step2m 39s
-
(Locked)
Demo: Creating and viewing the data table2m 40s
-
(Locked)
Importing raw data files4m 41s
-
(Locked)
Demo: Importing data5m 9s
-
(Locked)
Reporting data6m
-
(Locked)
Enhanced reporting: Labels and formats4m 54s
-
(Locked)
The FORMAT statement2m 54s
-
(Locked)
Demo: Labels, formats, and informats3m
-
-