Introduction to Programming in R

In this first lesson of our introduction to R programming course, you will learn about the R programming language. We’ll cover the syntax rules of R and take a look at how to explore data with R.

In addition to learning the syntax of R, you will learn about all about variables: what they are, how they're used, and how to assign values to them. You will also learn about vectors, a data structure in R designed to hold multiple values. Towards the end of this lesson, you will learn about functions and how they contribute to programming efficiently.

After you finish this lesson, you will be well-equipped to start building simple programs in R; what you build is limited by the depth of your imagination. If you have trouble coming up with ideas, you can practice by following this tutorial to build a simple calculator and maybe some additional ideas for programs will come to mind.

In the world of data science, R is an increasingly popular programming language for a reason. It was built with statistical manipulation in mind, and there’s an incredible ecosystem of packages for R that let you do amazing things – particularly in data visualization – that would be more difficult in Python. 

There are many reasons why learning R is important; so many reasons that we've written a whole blog post about why you should learn programming in R.


  • Learn R syntax basics.
  • Learn how to assign values to variables.
  • Learn to perform calculations using comparison operators.

Lesson Outline

1. Learning Data Science
2. Programming in R
3. R Syntax Rules
4. Exploring Data With R
5. Assigning Values to Variables
6. Programming With Variables
7. Vectors: Storage for Multiple Values
8. Efficient Programming with Functions and Vectors
9. Practice with Functions and Vectors
10. Next Steps
11. Takeaways

Take a Look Inside