Announcement Icon Online training class for Clinical R programming batch starts on Monday, 02Feb2026. Click here for details.

SASnR Lessons

OrderTitle
0110Install an R package
0120Load an R package (library)
1000Create Sample Data
1100Create a copy of an existing dataset
1200Subset Observations
1300Subset variables
1400Subset observations and variables
1500Renaming variables
1501Convert all the variable names to uppercase
1600Adding new variables
1700Appending datasets
1800Merging datasets
1850Merging datasets- select unmatched records
1860Merging datasets - cartesian product
1865conditional logic - case_when - .default and missing values
1870conditional logic - if_else
1875conditional logic - if_else - nested conditions
1900Sorting observations
1901Sort Order with Missing Values
2000Fetching Frequencies
2100Descriptive statistics for numeric variables
2110Summarize Age by Treatment Group with Descriptive Statistics
2200First dot concept
2210Last dot concept
2220First dot and last dot concept
2300Handling duplicates
2400Transpose data - long to wide
2500Transpose data - wide to long
2600Arrays-repeat same logic on multiple variables
2610Arrays - Example - replace a text value in all character variables
2611Arrays - Example - replace a value in all numeric variables
2612Arrays - Example - replace a value in all numeric and character variables
2700Retain first value of a subject onto other records
2701Retain last non-missing value
2702Retain minimum score upto the current observation
2703Retain maximum score upto the current observation
2705Retain - Concatenate character results into a single value in a group
2810Replicating the concept of usage of loops for dummy data creation
2900Replicate PROC FORMAT Using Named Vectors in R
3001Reading Files Using Path References
3100Character Functions
3190Count Missing Values in Selected Variables
3191Convert Between Character and Numeric Variables
3193Keep Only Variables with Non-missing Values Across Dataset
3201Apply Basic Numeric Functions
3210Round Numeric Values
3214Cumulative Sum, Mean, and Product
3304Extract Day, Month, Year, Weekday from Date
3407Find Maximum Value Across Multiple Variables in Each Row
3601Apply attributes to variables
4010Import data from Excel workbooks - CSV
4015Import data from Excel workbooks - XLSX
4020Import data from Excel workbooks - XLS
4025Export data to Excel workbook
5100Create a macro variable and use it in open code
5103Create a macro variable to store list of values and use it in open code
8100Get the list the files in a Directory/Folder to a dataset
8110List Files with Metadata: Size, Created and Modified Time
9105Detach an R package (unload from session)
9120Remove objects from the environment (rm / remove)
9550Run multiple programs from a single file