Using Variables in R

In R programming, we will be using variables all the time, so it is important to understand what a variable is and how it works in R.

A variable refers to a named storage that allows us to store data which our R programs can refer to and manipulate. A variable in R can store a value or an object (more on objects later). For example, we can store value ’50’ in a variable called ‘x’. This is called variable assignment, that is, the variable ‘x’ is assigned value ’50’.

Create Your Free Account

Create a free account to access this content and join our community of learners.

You'll get access to:

  • Access the full tutorial
  • Join our learning community
  • Track your progress
  • Bookmark content for later