|

SAS studio – dude, where’s my data set?

Working on some fun things  using  SAS Studio, so, expect a number of short posts over the next few days. Last time, I talked about the utilities and how easy it is to import an Excel file. Now let’s say maybe you are not aUnix person  and you have no idea how exactly to code a LIBNAME statement  that is not on Windows.  Never fear, it’s super easy.

Right click on the folder where you want to save your data set. From  the  menu that appears, select the last choice which is ‘properties’.

A window will come up that shows the name of your folder and its location, it’s easy to spot because it’s right next to the word Location. It will look something like this:

/home/your_name/data_analysis_examples

to save your data you have uploaded an Excel file and imported into  SAS, remember that the files were saved in the work directory and named import, import 1 etc.If I wanted to  sort those data sets and then merge them together into a permanent data set, I’d do it in the exact same way as if I was using Windows. The only thing different is the LIBNAME statement, as you can see below.

LIBNAME in “/home/your_name/data_analysis_examples”;

Proc sort data = work.import;
By username;

Proc sort data = work.import1;
By username;
data in.crossroads ;
merge work.import work.import1;
By username;
run;

If, later on, I want to use that data set in a program, again I would do it exactly the same as in Windows and the only thing different would be my LIBNAME.

 

LIBNAME in “/home/your_name/data_analysis_examples”;

 

Proc means data = in.Crossroads;

Run;

Completely random fact, unrelated to SAS studio, or maybe it is related,  I hurt my arm again, so I have been writing my SAS programs using Dragon voice recognition software.  If you are going to use SAS studio on a Mac, you should be aware that Dragon does not work on Firefox on the Mac so open up Chrome if you want to use voice recognition software, or at least the software from Dragon. This has nothing to do with SAS specifically.

 Support My Day Job!  Buy Games That Teach Social Studies And Math And Have Fun! (You can even get Making Camp for free! 

Buy our games

 

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *