Center for Customer Insights and Digital Marketing

R Workshop #5: R Programming

R Programming

Jarrod Griffin, Junior Marketing Scientist at the Center for Customer Insights and Digital Marketing, explains principles of good coding practice, describes logical operators such as equals(==), less than(<), and not(!), demonstrates various control structures such as if-statements and loops, creates our own R functions, and uses the family of apply functions.

If you haven't installed R or RStudio, click here to learn how!

Learning Outcomes

1.Describe good coding practice.

2. Use the various types of logical operators.

3. Use for loops in conjunction with other statements (if-else, next, break, etc).

4. Create your own R functions.

5. Use a family of apply() loop functions to simplify repeated tasks.

6. Be familiar with some build-in R functions.


Check below to view the video!

Relevant Links and Code:

Workshop #5 GitHub: https://github.com/jsgriffin96/r_workshop_5
R Style Conventions: http://adv-r.had.co.nz/Style.html
Supplementary Video on How to Link RStudio and Github: https://www.youtube.com/watch?v=ssEYd8T07y4&feature=youtu.be