Overview
Attendees will be taught the basics of the R programming language. Each topic will include a basic description of demonstration of the functionality, and then hands on exercises. Sections of similar functionality will end with exercises that will test students' understanding, and allow time for questions & answers.
Students completing this one day primer, will be comfortable building functional R routines, running and debugging these routines, reading and writing data that is used as inputs or outputs, and creating packages that allow them to simply share and deploy their routines to groups of users. They will also have a rudimentary understanding of how to build objects in R, and when they would be advantageous over typical functions.
Basic Course outline:
- Basic mathematical formulae, functions
- Vectors
- Creating R Programs and modules
- Stepping and Debugging in R Studio
- Functions - how to build them
- Lists
- Data Frames
- reading and writing from text files (.e.g CSV files)
- Conditionals & Looping
- if, if else, for, apply
- Error Handling
- Warnings vs Errors
- SuppressWarning, Stop on Warnings
- TryCatch
- Packages
- Advantages and Use
- Installing and using packages
- Creating your own packages
- Object Oriented R
- Advantages and Motivation
- S4 classes
Attendee Requirements
Attendees should have the following hardware, software, and background. Instructor will assume that attendees have the below prerequisites ready to go, so no time is wasted on installing / fixing software and hardware issues. People experiencing issues with software installation can contact instructor via email or phone prior to class and receive advice on how to proceed.
- Laptop computer with R Installed. It is free, open-source language, version 3.6.1 or newer, from here: https://www.r-project.org/
- RStudio Desktop, downloaded from here: https://rstudio.com/products/rstudio/ Follow directions to get it up and running.
- No prior knowledge of R is assumed. Attendees with some basic R experience will be fine as we will progress quickly from basic functionality to more advanced topics. Attendees with previous programming experience in other languages (Python, C, C++, Java, etc.) will learn R's differences and similarities, but no programming experience is required.
- Attendees should be comfortable with with basic numerical operations on a computer, like multiplication, division, raising numbers to powers, taking the log of numbers. We will do exercises that show how to easily perform more advanced operations like linear regression, sorting, ranking, and gathering statistics from data files. Attendees need not have any programming background, but need a basic understanding and comfort with simple numerical methods.
- Class is taught in English.