Lesson 17: SAS Learning Resources (SAS Documentation, Blogs, and Conference Papers)¶
Readings on How to Use SAS Studio via SAS ODA (Optional)
Where are the files that you have access to through SAS® Studio?
SAS Tutorials: Importing Data into SAS OnDemand for Academics
SAS on demand for Academics - Complete Guide for Using SAS on the Clouds
SAS TUTORIALS: USING SAS ON-DEMAND FOR ACADEMICS
Data Access Made Easy Using SAS® Studio
Option 3 (Part 2) Extend SAS ODA for Python Integration via SASPy
Option 4: Use SAS in the windowing environment in the GW virtual computer lab (https://gwu.apporto.com/). You don't need any software installation.
SAS Programming Documentation (Online Resources)¶
Programming Documentation for SAS® 9.4 and SAS® Viya® 3.4
SAS Blogs¶
How to share your SAS knowledge with your professional network
An online (unofficial) SAS® journal – written by bloggers
Learn SAS Programming - SASnrd
Questions in The Language of SAS
SAS Programming for R and Python Users¶
SAS v. R vs. Python – A Comparison of Data Exploration Techniques
SAS vs. Python - How Do They Compare
Comparing SAS® and Python – A Coder’s Perspective
Interaction between SAS® and Python for Data Handling and Visualization
SAS Basics¶
(Lesson 1) What is the SAS System?
(Lesson 1) Learn SAS® in 50 minutes
(Lesson 1) Data Step versus Everybody: Approaching Problems as a Beginning Coder
(Lesson 1) DATA Step: The Essence of DATA Step Programming
(Lesson 1) Making your SAS code more readable, Cody, R. SAS Blogs. November, 2019
Reading Data into SAS¶
- List Input and Modified List Input
- Column Input
- Formatted Input
- Named Input
(Lesson 2) Turning external files into SAS® data sets: common problems and their solutions
(Lesson 2) Four Options: FLOWOVER, STOPOVER, MISSOVER, and TRUNCOVER
(Lesson 2) Reading Delimited Text Files into SAS®9
(Lesson 2) Turn Web Source Code into SAS® Data in Two Easy Steps
(Lesson 2) Using variable names with special characters
(Lesson 2) Six ways to list variables in SAS
(Lesson 2) Writing to the SAS Log – PUT, PUTLOG, %PUT and List Statements
(Lesson 2) Reading multiple text files in SAS (Blogs)
(Lesson 2) The ABCs of PROC HTTP
(Lesson 2) Six tips for using PUT and %PUT statements in SAS
(Lesson 2): DATA Step: THE SAS SUPERVISOR
(Lesson 2): DATA Step: The Secret Life of DATA STEP
Missing Values¶
(Lesson 2) Ways to represent missing values for numeric variables in SAS
:pick:(Lesson 2) Call Missing Routine (SAS(R) 9.4 Documentation)
(Lesson 2) MISSING Function (SAS Documentation)
Data _NULL_¶
(Lesson 2) Writing Simple Text
(Lesson 2) The Power of TABLE Templates and DATA _NULL_
(Lesson 2) Report Creation Using Data _NULL__
(Lesson 2) Six ways to use the _NULL_ data step (Blogs)
(Lesson 2) How to split a raw file or a data set into many external raw files (Blogs)
SAS Formats¶
(Lesson 3) Formats are your Friends
(Lesson 3) PROC FORMAT in Action
(Lesson 3) PROC FORMAT is Our Friend
The ERROR option only applies with informats (not formats.)
proc format;
invalue racef
‘1’=’White’
‘2’=’Black’
‘3’=’Asian’
‘4’,’5’,’6’,’7’,’8’=_ERROR_
‘9’=’Other’
‘ ‘=’Unknown’;
run;
The SAME option is an alternate method for stating this default. Like the ERROR option above, it is only applicable to INFORMATS.
proc format;
invalue phasecd
1,2,3,4,5,6,7=’Treatment’
8,9,10,11,12=’Follow-up’
Other=_SAME_ ;
run;
proc format;
value phasecd (default=15)
-1, 0 = _SAME_
1,2,3,4,5,6,7=’Treatment’
8,9,10,11,12=’Follow-up’
other=_ERROR_;
run;
(Lesson 3) 5 reasons to use PROC FORMAT to recode variables in SAS
(Lesson 3) Some Useful Techniques of Proc Format
(Lesson 3) PROC FORMAT – Not Just Another Pretty Face (SUGI, 2005)
(Lesson 3) Controlling your formats (Blogs)
(Lesson 3) Lengths and formats: the long and short of it (Blogs)
Creating New Variables¶
(Lesson 3) 5 Ways to Create New Variables in SAS [Easy & Quick Methods]
(Lesson 3) The SELECT Statement in the SAS DATA Step (Blogs)
(Lesson 3) Two types of syntax for the SELECT-WHEN statement in SAS (Blogs)
(Lesson 3) The Essential Guide to Binning in SAS (SAS Blog)
:pick:(Lesson 3) Cumulative values - "We can do this the easy way, or the hard way..." (Blogs)
(Lesson 3) How to create dummy variables using DATA step
Perl Regular Expressions¶
Three typical uses of Perl regular expression in SAS (Zhang, S. 2007 - NESUG paper)¶
- Test for a pattern of characters within a string (Perform data validation)
- Replace text (Remove specific text within a string or replace with other text)
- Extract a substring (Extract text found in the string)
(Perl Regex) Use Perl Regular Expressions in SAS®
(Perl Regex) Facilitating Complex String Manipulations Using SAS PRX Functions
⛏️(Perl Regex) The Basics of the PRX Functions
(Perl Regex) Usage Note 38719: Use PRXMATCH in place of multiple INDEX functions
(Perl Regex) An Introduction to Regular Expressions with Examples from Clinical Data
(Perl Regex) Four steps to get a quick start with Perl Regular Expressions in SAS®
- Basic Metacharacters for Beginners
- String pattern testing online
- SEARCHING TEXT –PRXMATCH vs. INDEX & FINDC
- REPLACING TEXT – PRXCHANGE vs. SUBSTR (left of)
:pick:(Perl Regex) The PRXMATCH Function: A Perl of Great Price
Example SAS Code with PRX Functions¶
In the SAS program below,
- if the timepoint variable named pctpt has a value beginning with “FU”, the new variable flag1 is assigned a value “followup”
- if the pctpt value ends in “0HR”, flag1 is assigned a value “predose”
- if the pctpt value ends in “EOI”, flag1 is assigned a value “EOI”
data pk2;
merge pk1(in=a) supppc;
by pcseq usubjid;
if a;
length flag1 $ 20;
if prxmatch('/^FU/i',pctpt) then flag1='followup';
if prxmatch('/0HR$/i',strip(pctpt)) then flag1='predose';
if prxmatch('/EOI$/I',strip(pctpt)) then flag1='EOI';
run;
The code below creates a character variable time using PRX functions (PRXPASRE, PRRXMATCH, and PRXPOSN) and a numeric variable time1 using IF-PRXMATCH()-THEN in a DATA step.
data Example;
input pceltm $;
retain r;
if _N_ = 1 then r = prxparse('/PT(\d+)[HM]/');
if prxmatch(r, pceltm) then time = prxposn(r, 1, pceltm);
if prxmatch('/M/',pceltm) then time1=input(time, 8.)/60;
if prxmatch('/H/',pceltm) then time1=input(time, 8.);
datalines;
PT30M
PT2H
PT4H
PT6H
;
proc print noobs;
var pceltm time time1;
run;
##### INDEX function vs. PRXMATCH function for subsetting
```sas
where index(upcase(cmdecod),'CODONE') or
index(upcase(cmdecod),'MORPHONE') or
index(upcase(cmdecod),'METHADONE');
where prxmatch('/codone|morphone|methadone/i',cmdecod);
SAS Functions¶
(Lesson 4) Fifteen Functions to Supercharge Your SAS®, 2017
(Lesson 4) Concatenate simple trimmed values with the CATS function
(Lesson 4) Rounding values in SAS (Blogs)
(Lesson 4) Three of My Favorite Programming Tips(Blogs)
(Lesson 4) The IFN function (Blogs)
(Lesson 4) Using COMPRESS, CATS, and SUBSTR functions in SAS(Blogs)
(Lesson 4) Various useages of COMPRESS Function
(Lesson 4) Code examples: Difference between strip, compress and trim functions
(Lesson 4) Capture text between two delimiters FINDC and SUBSTR vs. SCAN
(Lesson 4) How to Extract a String Between 2 Characters in R and SAS
(Lesson 4) Adventures of a SAS detective and the fantastic FIND function
(Lesson 4) The COALESCE function: PROC SQL compared with PROC IML
(Lesson 4) SAS Interview Questions - Functions, etc.
(Lesson 4) Tales from the Help Desk: Solutions to Common DATA Step Tasks
SAS Dates¶
(Lesson 4 - SAS Dates) A Beginners Guide to SAS® Date and Time Handling
(Lesson 4 - SAS Dates) About SAS Date, Time, and Datetime Values
(Lesson 4 - SAS Dates) One informat to rule them all: Read any date into SAS (Blogs)
(Lesson 4 - SAS Dates) ANYDTDTMw.Informat (SAS Documentation)
(Lesson 4 - SAS Dates) An easy way to specify dates and times
(Lesson 4 - SAS Dates) FAQs about SAS dates, arrays and managing local PC files
(Lesson 4 - SAS Dates) Calculating the number of weekends until Easter
(Lesson 4 - SAS Dates) Computing Ages in SAS®
(Lesson 4 - SAS Dates) Age Is Just a Number: Accurately Calculating: Integer and Continuous Age
(Lesson 4 - SAS Dates) HOW OLD AM I?
(Lesson 4 - SAS Dates) In SAS, how can I calculate age from the date-of-birth data?
(Lesson 4 - SAS Dates) Pretty Dates All in a Row
(Lesson 4) FAQs about SAS dates, arrays and managing local PC files
(Lesson 4 - SAS Dates) Many dates comparison
Data Conversions¶
(Lesson 4) Working with Character Data
(Lesson 4) Converting Numeric Variables and Character Variables in SAS
(Lesson 4) Rhymes, mnemonics and tips in learning SAS
(Lesson 4) Converting variable types (Blogs)
(Lesson 4) Code examples: Data Type Conversion SAS
(Lessons 4 & 10 Macro): Character-to-numeric conversion in SAS (Blogs)
(Lesson 4) Drop leading zeros from character variable
Do Loops and Arrays¶
(Lesson 4) Ways to control the flow in a SAS Do Loop(Blogs)
(Lesson 4) Take Control: Understanding and Controlling Your Do-Loops
(Lesson 4) A Beginners Guide to ARRAYs and DO Loops
(Lesson 4) Using SAS® Arrays to Manipulate Data
(Lesson 4) Loop-Do-Loop Around Arrays
(Lesson 4) Fun with Fancy Arrays
(Lesson 4) Adventures in Arrays: A Beginning Tutorial
(Lesson 4) Using ARRAYS to transform variables in SAS(Blog)
(Lesson 4) Using Temporary ARRAYS in SAS (Blog)
(Lesson 4) Array, Hurray, Array; Consolidate or Expand Your Input Data Stream Using Arrays
(Lesson 4) Get the unique values of a variable in data order (Blogs)
Filtering Data¶
(Lesson 5) Syntax of WHERE Expression (SAS Documentation)
(Lesson 5) Some useful WHERE operators (Blogs)
(Lesson 5) Where Where is a Problem
(Lesson 5) Like Condition - Tests for a Pattern Matching
(Lesson 5) Wildcarding in WHERE Clauses
For example, this PROC PRINT shows a WHERE clause using the LIKE operator. With the LIKE operator, the underscore (_) is a wildcard for one character, and the percent sign (%) is a wildcard for more than one character."
data words;
infile datalines;
input vqueue $;
return;
datalines;
CTXYZ
XYZ.CT
ABCTG
RS.CT
;
run;
proc print data=words;
where VQueue like '%.CT';
title 'Search for %.CT - where % represents any characters before .CT';
run;
proc print data=words;
title 'Search for __XYZ -- 2 underscores represent any 2 characters before XYZ';
where VQueue like '__XYZ';
run;
The above paper shows how to use the IN operator and the colon (:) operator modifier to code character comparisons in SAS® DATA and PROC steps.
proc print data=sashelp.class;
where name in: ('Ja','Ro');
run;
data want;
set sashelp.class;
if prxmatch('/^(ja|ro)/oi',strip(name))>0;
run;
(Lesson 5) Usage Note 38719: Use PRXMATCH in place of multiple INDEX functions
(Lesson 5 Select Variables) A Simple Macro to Select Various Variables Lists
Reshaping Data¶
(Lesson 5) Wide" versus "Tall" data: PROC TRANSPOSE vs. the DATA step (Blogs)
(Lesson 5) (Lesson 5) New year refresher on reshaping data (Blog)
(Lesson 5) Transposing Data for Statistical Analysis
(Lesson 5) Double PROC TRANSPOSE method for reshaping your data set with multiple BY variables (SAS Documentation)
(Lesson 5) A Better Way to Flip (Transpose) a SAS® Dataset
(Lesson 5) PROC TRANSPOSE and "Double Transpose"
(Lesson 5) How do I do a double transposition in SAS(Stackoverflow) Code
(Lesson 5) Five Ways to Flip-Flop Your Data
(Lesson 5) Challenges in Reshaping & Reporting DATA - Overcome with ARRAYS & 'V'
Sharpening Your Skills in Reshaping data: PROC TRANSPOSE vs. Array Processing
Sorting Data¶
(Lesson 5) The SORT Procedure: Beyond the Basics
There are a few things to keep in mind when using these options.
- First, if you use the RENAME= option, SAS changes the variable's name in that procedure.
- Second, if you use RENAME= with either the DROP= or the KEEP= options, the DROP= and
the KEEP= options are applied before RENAME=. Thus, use the “old name” in the DROP=
and KEEP= options.
- The order in which you place the RENAME=, DROP=, and KEEP= options does not matter
and does not change process order.
- About using parentheses, a list of multiple variables to rename must be enclosed
in parentheses, renaming just one variable does not, and the KEEP= variables should
not be enclosed in parentheses.
- Remember that you cannot drop and rename the same variable in the same statement.
Here is an example of using both the KEEP= and RENAME= options
proc sort data=demo out=demo5(rename=(patient=pt age=dxage) keep=patient age);
by patient;
run;
Below are two alternate ways:
proc sort data=demo out=demo5(keep=patient age rename=(patient=pt age=dxage));
by patient;
run;
proc sort data=demo(keep=patient age rename=(patient=pt age=dxage)) out=demo5;
by pt;
run;
(Lesson 5) An Easy Way to Split a SAS® Data Set into Unique and Non-Unique Row Subsets
(Lesson 5) Create Custom Sort Order in SAS
(Lesson 5) Horizontal Data Sorting and Insightful Reporting: A Useful SAS® Technique
(Lesson 5) Using CALL SORTN to save coding
Sampling¶
(Lesson 5) Sample with replacement in SAS (Jan 29,2014)
(Lesson 5) Sample without replacement in SAS
(Lesson 5) Efficient DATA Step Random Sampling Out Of Thin Air
PROC SQL¶
(Lesson 6) An Introduction to SQL in SAS®
(Lesson 6) Example Code: Using the SQL Procedure
(Lesson 6) Sample 25278: Manipulating Data with PROC SQL
(Lesson 6) Life saver tip for comparing PROC SQL join with SAS data step merge
(Lesson 6) PROC SQL: A Powerful Tool to Improve Your Data Quality
(Lesson 6) Accessing Data Using SQL
(Lesson 6) Using Proc SQL to Run SAS® Procedures on a Group of Datasets within a Single Directory
Variable Lists with Wild Characters in PROC SQL¶
(Lesson 6) Guidance for using Wildcards for Pattern Matching with PROC SQL
(Lesson 6) Select Variables with PROC SQL) Six Useful Data Tool Macros Source of the SAS code below:
(Lesson 6) Accessing SAS Information By Using DICTIONARY Tables
proc sql;
select name from dictionary.columns
where libname= upcase("work") and memname = upcase("test") and
name like "%#_abc" escape '#';
quit;
The sample code above illustrates how to use the wildcard characters. In this example code, we want to select those variables whose names have the suffix “_abc” from the dataset “test” saved in the “work” library.
The “escape” clause is used to search for literal instances of the percent (%) and underscore (_) characters, which are usually used for pattern matching. SAS® allows for variable names beginning with “_,” and it happens that “_” is a wildcard character. Thus, to select variables that contain the “_” in their names, we could use an ESCAPE character and add this ESCAPE character before the “_” to tell SAS® the “_” is not a wildcard character. The “#” is the ESCAPE character in the above syntax.
Suppose you want to select those variables whose names start with an “a,” followed by a character, then followed by “_123” in the middle, and ended with “b.” To accomplish this, you could pass “a_#_123%b” to the parameter “pattern.”
Combining Data¶
(Lesson 6) SET, MERGE and beyond. Telanus, EW. 2008. SAS Global Forum Paper.
(Lesson 6) Many-to-Many Merges in the DATA Step
(Lesson 6) Merging Data Eight Different Ways
(Lesson 6) Filtering data - Example code below, by Cynthia_SAS
"SAS has a lot of string processing functions (such as FIND, FINDW, INDEX, INDEXC, etc.) and Perl Regular Expressions, which might work for you. It also might be that a simple LIKE or CONTAINS operator might work for you.
(Lesson 6) Updating a master file from a transaction file (Blog)
(Lesson 6) What happens when the SET statement misbehaves—and how you can fix it!
(Lesson 6) Exploring techniques of using multiple SET statements in a DATA step
Aggregating Data¶
(Lesson 6) Group processing in SAS: The NOTSORTED option
(Lesson 6) How to use FIRST.variable and LAST.variable in a BY-group analysis in SAS
(Lesson 6) New Ways and Means to Summarize Files
(Lesson 6) Why choose between SAS Data Step and PROC SQL when you can have both?
(Lesson 6) PROC SQL for PROC SUMMARY Stalwarts
(Lesson 6) Dear Miss SASAnswers: A Guide to Efficient PROC SQL Coding
Summarizing Data with SAS Base Procedures¶
(Lesson 7) It’s All about the Base—Procedures
(Lesson 7) It’s All about the Base—Procedures, Part 2
(Lesson 7) Thirteen Statistics Every Biostatistician Should Know
(Lesson 7) PROC TABULATE: Doing More
(Lesson 7) Sample 45972: Add a blank row in PROC TABULATE output in ODS destinations
Lesson 7) Sample 25401: Demonstrate the use of banding in PROC TABULATE
(Lesson 7) Getting it Done with PROC TABULATE
(Lesson 7) How to use Proc Tabulate
(Lesson 7) Introduction to PROC TABULATE
(Lesson 7) The MEANS/SUMMARY Procedure: Getting Started
(Lesson 7) Basic Differences Between Proc MEANS and Proc SUMMARY
(Lesson 7) Learning PROC REPORT by Comparison
(Lesson 7) Don’t be afraid of PROC REPORT – a step-by-step guide
(Lesson 7) Beyond the Basics: Advanced PROC REPORT Tips and Tricks
(Lesson 7) ORDER, ORDER PLEASE: SORTING DATA USING PROC REPORT
(Lesson 7) How to avoid 6 common PROC REPORT errors
(Lesson 7) Customizing output from PROC MEANS (Blogs, 2015)
(Lesson 7) Usage Note 46427: STACKODSOUTPUT new for PROC MEANS in SAS 9.3
(Lesson 7) Which Base procedure is best for simple statistics?
(Lesson 7) Generating Simple Statistics with Base SAS Procedures
(Lesson 7) Creating summary data set
(Lesson 7) Maintaining Formats when Exporting Data from SAS® into Microsoft® Excel®
Output Delivery System (ODS)¶
[(Lesson 7)ODS Basics
(Lesson 7) ODS OUTPUT: Store any statistic created by any SAS procedure
"You can use ODS to send SAS tables and graphics to various output destinations, including HTML, PDF, RTF, and PowerPoint".
In summary, the ODS OUTPUT statement enables you to create a data set containing any statistic a SAS procedure generates. You can use the ODS OUTPUT statement to capture a statistic and use it later in your program.
(Lesson 7) A Deep Dive into the SAS® ODS Excel Destination
(Lesson 7) Using Procedure-Based ODS Data Components in Statistical Reporting
(Lesson 7) Five reasons to use ODS EXCLUDE to suppress SAS output (Blogs)
(Lesson 7) How to view or create ODS output ...(Blogs)
(Lesson 7) Using ODS OUTPUT to capture PROC output results in SAS (Blogs)
(Lesson 7) Using ODS to send output to alternate destinations (Blogs)
(Lesson 7) Automating Excel workbooks creation using SAS
(Lesson 7) SAS Regression Output Data Structure - ods output ParameterEstimates
(Lesson 7) 10 posts from 2018 that deserve a second look
Data Cleaning and Validation¶
(Lessons 5-7) Data Cleaning 101: An Analyst’s Perspective- (PROC TRANSPOSE, PROC SQL, CALL SYMPUT, DO-LOOP, and PRX functions)
(Lessons 5-7) Data Cleaning 101
(Lessons 5-7) Keeping your SAS data sets clean (Blogs)
(Lessons 5-7) LET SAS® CLEANSE YOUR DIRTY DATA
(Lessons 5-7) Best Practices: PUT More Errors and Warnings in My Log, Please!
(Lessons 5-7) Using informats to filter invalid values (Blogs)
Macro Facility¶
(Lessons 9-11) Before You Get Started: A Macro Language Preview in Three Parts
(Lesson 9) Sample 40271: Conditional execution using only a function with %SYSFUNC
(Lessons 9-11) No, it's not magic: De-mystifying the SAS® Macro Facility by Jaffe, JA. WUSS. 2009
(Lessons 9-11) Underutilized Features in the SAS® Macro Language (Excellent article)
(Lessons 9-11) Demystifying the SAS® Macro Facility - by Example
(Lessons 9-11) No, it's not magic: De-mystifying the SAS® Macro Facility by Jaffe, JA. WUSS. 2009
(Lessons 9-11) SAS Macro Efficiencies
(Lessons 9-11) Macro Topics (Blogs by various authors, 2011-2018)
Macro Variables¶
(Lesson 9) Five Ways to Create Macro Variables
(Lesson 9) Sample 45626: Using Macro processing to create new variable names from variable values
(Lesson 9) Think Globally, Act Locally: Understanding the Global and Local Macro Symbol Tables
(Lesson 9) Create a SAS macro variable that contains a list of values
Macro Quoting Functions¶
(Lesson 10) 5 SAS Macro Quoting Functions You Should Know
(Lesson 10) Macro Quoting: Which Function Should We Use?
(Lesson 10) To %Bquote or not to %Bquote?
(Lesson 10) Quote confusion: How do quotes and macro work together? By Marty Hultgren (Blogs)
(Lessons 10-11) Protecting Macros and Macro Variables
(Lesson 10) Macro quoting made easy (Blogs)
(Lesson 10) Protecting Your Programs from Unwanted Text Using Macro Quoting
Macro Programming¶
(Lesson 11) SAS® Macros: Beyond the Basics
(Lesson 11) Using %IF-%THEN-%ELSE in SAS programs (no macro required, i.e., in open code)
(Lesson 11) Hands-On SAS® Macro Programming Essentials for New Users
(Lesson 11) Macro Architecture in Pictures
(Lesson 11) SAS® MACRO: Beyond the Basics
(Lesson 11) %DO Loop – a Simple Dynamic Programming Technique
(Lesson 11) Data-driven SAS macro loops
(Lesson 11) The Ins and Outs of %IF
(Lesson 11) Automating Reports Using Macros and Macro Variables
(Lesson 11) Two macros for detecting data errors
(Lesson 11) A Simple Macro to Select Various Variables Lists
(Lesson 11) Example 1: Understanding the macro code
(Lesson 11) Call Execute: Let Your Program Run Your Macro
Macro Catalogs and Utility Macros¶
(Lesson 11) Quick ‘n Dirty - Small, Useful Utility Macros
(Lesson 11) Sample 25035: Utility routines for procedure-like macros
(Lesson 11) Utility Macros to Check for Changes in Macro Variables, Options, or Formats in SAS®
(Lesson 11) Six Useful Data Tool Macros
SAS/IML¶
(Lesson 12) Ten tips for learning the SAS/IML language
(Lesson 12) SAS/IML functions that operate on columns of a matrix
(Lesson 12) Shorthand notation for row and column operations
(Lesson 12) Everything you wanted to know about writing SAS/IML modules
(Lesson 12) The WHERE clause in SAS/IML
(Lesson 12) Complex assignment statements: CHOOSE wisely
(Lesson 12) Finding matrix elements that satisfy a logical expression
(Lesson 12) Finding observations that satisfy multiple conditions: The LOC-ELEMENT technique
(Lesson 12) Data tables: Nonmatrix data structures in SAS/IML
(Lesson 12) Lists: Nonmatrix data structures in SAS/IML
(Lesson 12) More Than Matrices: SAS/IML® Software Supports New Data Structures
(Lesson 12) Use the FLOOR-MOD trick to allocate items to groups
(Lesson 12) Never End PROC IML with a RUN Statement
(Lesson 12) The intersection of multiple sets
(Lesson 12) Statistical programming in SAS with an emphasis on SAS/IML programs
(Lesson 12) PROC IML - Beware the naked LOC
(Lesson 12) Data-driven simulation
(Lesson 12) How to simulate data from a generalized linear mode (May 6,2019)
(Lesson 12) Lists: Nonmatrix data structures in SAS/IML
(Lesson 12) Print tables in SAS/IML
(Lesson 12) Data tables: Nonmatrix data structures in SAS/IML
(Lesson 12) TABLEPRINT Call (SAS/IML 14.2 User’s Guide)
(Lesson 12) Get the unique values of a variable in data order
Working with SAS/IML¶
- Send IML matrices and SAS data sets to R.
- Submit R code in the IML script.
- Return R results as IML matrices or SAS data sets.
Calling Functions in the R Language (SAS Documentation)
Programming Efficiency¶
(Lesson 13) Why Does SAS® Say That?
(Lesson 13) The Top 10 Head-Scratchers
(Lesson 13) Dear Miss SASAnswers: A Guide to SAS®
(Lesson 13) Essential SAS® Coding Techniques for Gaining Efficiency
(Lesson 13) Quickish Performance Techniques for Biggish Data (SGF, 2017)
(Lesson 13) Efficient Use of Disk Space in SAS® Application Programs
(Lesson 13) Minimizing and Optimizing Resource Consumption - SAS Documentation)
(Lesson 13) Secrets of Efficient SAS® Coding Techniques
(Lesson 13) SAS ® PROGRAM EFFICIENCY FOR BEGINNERS
(Lesson 13) TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE
(Lesson 13) Leave Your Bad Code Behind: 50 Ways to Make Your SAS® Code Execute More Efficiently
(Lesson 13) Tips and Techniques for the SAS® Programmer
(Lesson 13) Maxims of Maximally Efficient SAS Programmers
Simulating Data¶
(Lesson 13) Data-driven simulation
(Lesson 13) Simulation in SAS with Comparisons to R
(Lesson 13) Four essential functions for statistical programmers(Blogs)
(Lesson 13) Simulate data for a regression model with categorical and continuous variables (Blogs)
(Lesson 13) The essential guide to bootstrapping in SAS
Advanced Topic: Table Lookups¶
(DOW-Loop) Practical Use of the DOW Loop (Examples with Data)
(DOW-Loop) The DOW-Loop Unrolled
(DOW-Loop) The DOW-loop: A Smarter Approach to your Existing Code
(DOW-Loop) Understanding and Applying the Logic of the DOW-Loop
(DOW-Loop) Understanding and Applying the Logic of the DOW-Loop
(DOW-Loop) The DOW loop(Code example)
(DOW-Loop) Explanation of Nested DOW-Loop in SAS
(Table Lookups) Table Lookups: From IF-THEN to Key-Indexing
(Table Lookups) Using Table Lookup Techniques Efficiently
(Table Lookups) Lookup Techniques: From the Basics to the Innovative
(Table Lookups) No More Merge - Alternative Table Lookup Techniques
(Table Lookups) Comparison of different ways using table lookups on huge tables
(Table Lookups) Table Lookups in the SAS® Data Step
(Table Lookups) Scalability of Table Lookup Techniques
R and Python with SAS¶
(Lesson 14) Getting started using SASPy® and the SAS® kernel for Jupyter Notebook
(Lesson 14) Using the R interface in SAS ® to Call R Functions and Transfer Data
(Lesson 14) Make Your SAS® Code Environmentally Aware
(Lesson 14) Machine learning with SASPy: Exploring and preparing your data (part 1) Blogs
(Lesson 14) Machine learning with SASPy: Exploring and preparing your data (part 2)
(Lesson 14) Machine Learning with SASPy: Exploring and Preparing your data – (Part 3)
(Lesson 14) STEPPING UP YOUR SAS® GAME WITH JUPYTER NOTEBOOKS (SGF,2019)
(Lesson 14) Python-izing the SAS Programmer. By Mike Molter
(Lesson 14) Connecting to Datasets through Python and SAS®
(Lesson 14) A Complete Introduction to SASPy and Jupyter Notebooks. By Jason Phillips, 2019
(Lesson 14) A Complete Introduction to SASPy and Jupyter Notebooks
(Lesson 14) Utilization of Python in clinical study by SASPy
(Lesson 14) A Basic Introduction to SASPy and Jupyter Notebooks
(Lesson 14) Introducing SASPy: Use Python code to access SAS
(Lesson 14) How to code in Python with SAS 9.4
(Lesson 14) Open Your Mind: Use Cases for SAS® and Open-Source Analytics
{A Gentle Introduction to R From A SAS Programmer's Perspective](https://www.pharmasug.org/proceedings/2018/HT/PharmaSUG-2018-HT04.pdf)
Expand Your Skills from SAS® to R with No Complications
A Method for Independent Program Validation utilising SAS®, R and Python
Jupyter Notebook¶
(Jupyter) Short-cuts in Jupyter Notebook
(Jupyter) Teaching and Learning with Jupyter, 2019
(Jupyter) STEPPING UP YOUR SAS® GAME WITH JUPYTER NOTEBOOKS
(Jupyter) Revolutionizing Statistical Computing in SAS® with the Jupyter Notebook
(Jupyter) Telling Stories with Jupyter notebook
$\textnormal{\color{red} File Manipilation Using SAS, R, and Python}$¶
Organize and Manage Files by SAS® Programming
Create an SAS Program that Can Read the Contents of a Directory
Mastering File Manipulation with R’s list.files() Function
Adeleke, Kafilat. Mastering File and Directory Management in Python
Formatting GitHub-Flavored Markdown¶
Supported color models for GitHub-flavored Markdown
Flow Chart on GitHub¶
Online Tools¶
Convert Any Text to Any Format - e.g., IPYNB to Python files
Remove line numbers from file content with line numbers
SSH into GitHub¶
How to SSH into GitHub on Windows example
Bash Tools¶
How to View and Edit File Contents in Bash
muhuri@CCASTA-HWJP0G2 MINGW64 ~ (master)
$ ssh-keygen -o
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/pmuhuri/.ssh/id_rsa):
Created directory '/c/Users/pmuhuri/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/pmuhuri/.ssh/id_rsa
Your public key has been saved in /c/Users/pmuhuri/.ssh/id_rsa.pub
The key fingerprint is: