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

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…

Contents