Chapter 2: R programming basics

In R Programming Basics, you will master the basic operations of this popular open source language. You will also learn to perform simple algebraic operations on vectors and matrices. You will also learn about data frames, conditional statements, loops, and functions to power your R code, making your work more efficient and elegant.

1Arithmetic and Variable Assignment

2Basic Data Types in R


4Check Your Understanding on Vectors


6Check Your Understanding on Matrices

7Data Frames

8Conditional Statements

9Check Your Understanding on Conditional Statements



About this course

A website with materials to help you learn R and use it to explore data. No prior experience in programming, statistics, or data is required to work through these materials. These materials were developed to prepare our students for our courses that expect some familiarity of R and data analysis.

About us

Monash University Logo

This course is brought to you by the team at Monash University, Department of Econometrics and Business Statistics. You can find the full list of contributors in the link 'Contributors' at the footer of this site.