Sep 13, 2024
can.edu
.VM Fusion:
SAS Studio (Online Version):
Creating a Library in SAS:
libname
keyword to create a permanent library.libname clinic 'path-to-folder';
Data Portability:
data
and set
statements.data clinic.new_dataset; set clinic.existing_dataset; run;
Basic Syntax:
;
.* comment text;
or /* comment text */
.Data Components:
.
and character by a blank.Printing and Summarizing Data:
proc print data=library.dataset; run;
prints data.proc contents data=library.dataset; run;
prints metadata.Creating New Variables:
data new_dataset; set old_dataset; new_var = old_var / 2; run;
Importing Excel Data: Proc Import
proc import
to load Excel files into SAS datasets.proc import datafile='path' out=library.dataset dbms=xlsx replace; sheet='Sheet1'; run;
Exporting to Excel or CSV: Proc Export
proc export
to save datasets to Excel or CSV.proc export data=library.dataset outfile='path' dbms=csv replace; run;