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.

Demo: Creating and viewing the data table

Demo: Creating and viewing the data table - SAS Tutorial

From the course: SAS Programming for R Users, Part 1

Demo: Creating and viewing the data table

- [Instructor] Open up the SP4R02d01 file to read in a few new datasets manually. So, here I'm creating a dataset called example_data. I'm saving it in the SP4R library, so it will be saved permanently. In the input statement, I have four variables. First name which is character valued, so I have a dollar sign. Last name which is also character valued, so I have another dollar sign. And, two numeric valued variables, age and height. Then, I'll specify the data lines and go ahead and type in all my data. So, here I have my name, Jordan Bakerman, 27 years old, 68 inches tall, and a few of my friends as well. Remember your semicolon and your run statement to finish up your data step. Now, you noticed here, the last observation has more than eight bytes. JeanClaude has actually ten characters, so I need to use a length statement to change the number of bytes for the variable. So, in the length statement, I'll specify first name and last name and I'll just say, hey, let them be up to 25…

Contents